Chang-Joo Kim

24 papers B 2Journal 7Unranked 15
YearRankTypeTitle / Venue / Authors
2015 J jnl
IEEE Trans. Control. Syst. Technol.
Chang-Joo Kim, Sangkyung Sung
2015 conf
ICTC
Kyung-Yul Cheon, Chang-Joo Kim, Jun Kyun Choi
2014 conf
ICUIMC
Yalew Zelalem Jembre, Rajib Paul, Young-June Choi, Kyung-Yul Cheon, Chang-Joo Kim
2013 conf
ICOIN
Hyochun Ahn, Youn Seo, Jaebeom Kim, Young-Bae Ko, Cheolhyo Lee, Chang-Joo Kim
2011 J jnl
IEICE Trans. Commun.
Jung-Sun Um, Sung-Hyun Hwang, Chang-Joo Kim, Byung Jang Jeong
2011 conf
VTC Spring
Jin Soo Wang, Jin Bae Park, Sung-Hyun Hwang, Chang-Joo Kim, Yun Hee Kim
2010 J jnl
IEEE Commun. Mag.
Gwangzeen Ko, A. Antony Franklin, Sung-jin You, Jin-Suk Pak, Myung Sun Song, Chang-Joo Kim
2010 conf
ISWCS
A. Antony Franklin, Jin-Suk Pak, Hoiyoon Jung, Sangwon Kim, Sung-jin You, Jung-Sun Um, Sunmin Lim, Gwangzeen Ko, Sung-Hyun Hwang, Byung Jang Jeong, Myung Sun Song, Chang-Joo Kim
2010 conf
ICTC
Hoiyoon Jung, Sunmin Lim, Sangwon Kim, Byung Jang Jeong, Chang-Joo Kim
2009 conf
VTC Spring
Jin Soo Wang, Sung Bo Sim, Jae Cheol Park, Jung-Sun Um, Chang-Joo Kim, Yun Hee Kim
2008 conf
CrownCom
Sung-Hyun Hwang, Jung-Sun Um, Myung Sun Song, Chang-Joo Kim, Hyung Rae Park, Yun Hee Kim
2008 conf
CrownCom
Moonwon Lee, Gwangzeen Ko, Sunmin Lim, Myung Sun Song, Chang-Joo Kim
2008 conf
CrownCom
Cha-sik Leem, Jaiyong Lee, Hyunduk Kang, Chang-Joo Kim, Moonwon Lee, Sung-Chul Kang
2008 conf
CrownCom
Chang-Joo Kim, Cha-sik Leem, Sung-Chul Kang, Jaiyong Lee
2008 conf
CrownCom
Cha-sik Leem, Jaiyong Lee, Sangwon Kim, Chang-Joo Kim, Sung-Chul Kang
2007 conf
FGCN (1)
Zhu Chen, Moon Ho Lee, Chang-Joo Kim
2007 J jnl
IEEE Commun. Lett.
Moon Ho Lee, Alexander N. Dudin, Valentina I. Klimenok, Chang-Joo Kim
1998 J jnl
IEEE Trans. Commun.
Chang-Joo Kim, Hyuck-Jae Lee, Hwang-Soo Lee
1997 conf
ICC (3)
Young-Su Kim, Chang-Joo Kim, Goo-Young Jeong, Young-Jo Bang, Han-kyu Park, Sang-Sam Choi
1996 B conf
PIMRC
Young-Su Kim, Goo-Young Jeong, Chang-Joo Kim, Dong-du Lee, Jae-Kyoung Mun, Han-kyu Park, Sang-Sam Choi
1995 B conf
PIMRC
Chang-Joo Kim, Young-Su Kim, Goo-Young Jung, Hyuck-Jae Lee
1995 J jnl
Signal Process.
Chang-Joo Kim, Hwang-Soo Lee
1993 J jnl
Signal Process.
Chang-Joo Kim, Dong-Seog Han, Hwang-Soo Lee
1990 conf
ICSLP
Jung-Chul Lee, Yong-Ju Lee, Hee-il Han, Eung-Bae Kim, Chang-Joo Kim, Kyung-Tae Kim
redb/logging_utils.py
← Index redb/logging_utils.py python
"""
Logging utilities and shared enums for REDB.

Contains the ImportResult enum, log formatters, and logger setup functions
used across the ingestor pipeline.
"""
import logging
from logging.handlers import QueueHandler
import os
from enum import Enum


class ImportResult(Enum):
    CORRECTLY = 0
    PARTIALLY = 1
    FAILED = 2
    PENDING = 3
    SKIPPED = 4


class FileNameFormatter(logging.Formatter):
    def format(self, record):
        record.filenameinfo = getattr(record, "filenameinfo", "unknown")
        return super().format(record)


def setup_logger(log_queue, filename):
    logger = logging.getLogger(filename)
    if not logger.handlers:
        if os.getenv("SERVER_ENV") == "prod":
            logger.setLevel(logging.INFO)
        else:
            logger.setLevel(logging.DEBUG)
        handler = QueueHandler(log_queue)
        logger.addHandler(handler)
        logger.propagate = False  # Prevent propagation to parent loggers
    return logger


def logger_thread(log_queue, log_file):
    handler = logging.FileHandler(log_file)
    formatter = FileNameFormatter(
        "%(asctime)s - %(filenameinfo)s - %(levelname)s - %(message)s"
    )
    handler.setFormatter(formatter)

    while True:
        try:
            record = log_queue.get()
            if record is None:
                break
            # Format and write the log record
            message = formatter.format(record)
            handler.stream.write(message + "\n")
            handler.stream.flush()
        except Exception:
            import traceback
            import sys

            print("[ERR] Error in logger thread:", file=sys.stderr)
            traceback.print_exc(file=sys.stderr)


def setup_direct_logger(log_file, filename, pid=None):
    """Setup a logger that writes directly to the log file without using a queue."""
    # Create a unique logger name using the process ID
    logger_name = f"{filename}_{pid}" if pid else filename
    logger = logging.getLogger(logger_name)

    if not logger.handlers:
        handler = logging.FileHandler(log_file)
        formatter = logging.Formatter("%(asctime)s - %(filenameinfo)s - %(levelname)s - %(message)s")
        handler.setFormatter(formatter)
        logger.addHandler(handler)

        if os.getenv("SERVER_ENV") == "prod":
            logger.setLevel(logging.INFO)
        else:
            logger.setLevel(logging.DEBUG)

    # Add filename info to the logger's extra info
    extra = {"filenameinfo": filename}
    logger = logging.LoggerAdapter(logger, extra)

    return logger