import logging


class CavalibaLogHandler(logging.Handler):
    def __init__(self) -> None:

        # self.xxx = XXXX
        logging.Handler.__init__(self=self)

    def emit(self, log: logging.LogRecord) -> None:

        pass
        # print(f"CLOG: {log.levelname} {log.msg} ")
        # with open("/tmp/logtest.txt",'a',encoding = 'utf-8') as f:
        #     f.write(f"{log.levelname} {log.msg} \n")

        # name (str) – The name of the logger used to log the event represented by this LogRecord. Note that the logger name in the LogRecord will always have this value, even though it may be emitted by a handler attached to a different (ancestor) logger.

        # level (int) – The numeric level of the logging event (such as 10 for DEBUG, 20 for INFO, etc). Note that this is converted to two attributes of the LogRecord: levelno for the numeric value and levelname for the corresponding level name.

        # pathname (str) – The full string path of the source file where the logging call was made.

        # lineno (int) – The line number in the source file where the logging call was made.

        # msg (Any) – The event description message, which can be a %-format string with placeholders for variable data, or an arbitrary object (see Using arbitrary objects as messages).

        # args (tuple | dict[str, Any]) – Variable data to merge into the msg argument to obtain the event description.

        # exc_info (tuple[type[BaseException], BaseException, types.TracebackType] | None) – An exception tuple with the current exception information, as returned by sys.exc_info(), or None if no exception information is available.

        # func (str | None) – The name of the function or method from which the logging call was invoked.

        # sinfo (str | None) – A text string representing stack information from the base of the stack in the current thread, up to the logging call.
