mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono-python.git
synced 2024-09-27 18:56:20 +08:00
36 lines
585 B
Python
36 lines
585 B
Python
from logger import logger as logger_impl
|
|
|
|
class logger:
|
|
|
|
debug_mode: bool = False
|
|
|
|
@staticmethod
|
|
def trace (msg: str):
|
|
if (logger.debug_mode):
|
|
logger_impl.trace(msg)
|
|
|
|
@staticmethod
|
|
def debug (msg: str):
|
|
if (logger.debug_mode):
|
|
logger_impl.debug(msg)
|
|
|
|
@staticmethod
|
|
def info (msg: str):
|
|
logger_impl.info(msg)
|
|
|
|
@staticmethod
|
|
def warn (msg: str):
|
|
logger_impl.warn(msg)
|
|
|
|
@staticmethod
|
|
def error (msg: str):
|
|
logger_impl.error(msg)
|
|
|
|
@staticmethod
|
|
def fatal (msg: str):
|
|
logger_impl.fatal(msg)
|
|
|
|
|
|
def set_debug_mode(mode: bool):
|
|
logger.debug_mode = mode
|