project map script | semantic parcer
This commit is contained in:
@@ -53,7 +53,7 @@ class SupersetLogger:
|
||||
console_handler = logging.StreamHandler(sys.stdout)
|
||||
console_handler.setFormatter(formatter)
|
||||
self.logger.addHandler(console_handler)
|
||||
# [/DEF:SupersetLogger.__init__]
|
||||
# [/DEF:SupersetLogger.__init__:Function]
|
||||
|
||||
# [DEF:SupersetLogger._log:Function]
|
||||
# @PURPOSE: (Helper) Универсальный метод для вызова соответствующего уровня логирования.
|
||||
@@ -64,44 +64,44 @@ class SupersetLogger:
|
||||
# @PARAM: exc_info (bool) - Добавлять ли информацию об исключении.
|
||||
def _log(self, level_method: Any, msg: str, *args: Any, extra: Optional[Mapping[str, Any]] = None, exc_info: bool = False) -> None:
|
||||
level_method(msg, *args, extra=extra, exc_info=exc_info)
|
||||
# [/DEF:SupersetLogger._log]
|
||||
# [/DEF:SupersetLogger._log:Function]
|
||||
|
||||
# [DEF:SupersetLogger.info:Function]
|
||||
# @PURPOSE: Записывает сообщение уровня INFO.
|
||||
def info(self, msg: str, *args: Any, extra: Optional[Mapping[str, Any]] = None, exc_info: bool = False) -> None:
|
||||
self._log(self.logger.info, msg, *args, extra=extra, exc_info=exc_info)
|
||||
# [/DEF:SupersetLogger.info]
|
||||
# [/DEF:SupersetLogger.info:Function]
|
||||
|
||||
# [DEF:SupersetLogger.debug:Function]
|
||||
# @PURPOSE: Записывает сообщение уровня DEBUG.
|
||||
def debug(self, msg: str, *args: Any, extra: Optional[Mapping[str, Any]] = None, exc_info: bool = False) -> None:
|
||||
self._log(self.logger.debug, msg, *args, extra=extra, exc_info=exc_info)
|
||||
# [/DEF:SupersetLogger.debug]
|
||||
# [/DEF:SupersetLogger.debug:Function]
|
||||
|
||||
# [DEF:SupersetLogger.warning:Function]
|
||||
# @PURPOSE: Записывает сообщение уровня WARNING.
|
||||
def warning(self, msg: str, *args: Any, extra: Optional[Mapping[str, Any]] = None, exc_info: bool = False) -> None:
|
||||
self._log(self.logger.warning, msg, *args, extra=extra, exc_info=exc_info)
|
||||
# [/DEF:SupersetLogger.warning]
|
||||
# [/DEF:SupersetLogger.warning:Function]
|
||||
|
||||
# [DEF:SupersetLogger.error:Function]
|
||||
# @PURPOSE: Записывает сообщение уровня ERROR.
|
||||
def error(self, msg: str, *args: Any, extra: Optional[Mapping[str, Any]] = None, exc_info: bool = False) -> None:
|
||||
self._log(self.logger.error, msg, *args, extra=extra, exc_info=exc_info)
|
||||
# [/DEF:SupersetLogger.error]
|
||||
# [/DEF:SupersetLogger.error:Function]
|
||||
|
||||
# [DEF:SupersetLogger.critical:Function]
|
||||
# @PURPOSE: Записывает сообщение уровня CRITICAL.
|
||||
def critical(self, msg: str, *args: Any, extra: Optional[Mapping[str, Any]] = None, exc_info: bool = False) -> None:
|
||||
self._log(self.logger.critical, msg, *args, extra=extra, exc_info=exc_info)
|
||||
# [/DEF:SupersetLogger.critical]
|
||||
# [/DEF:SupersetLogger.critical:Function]
|
||||
|
||||
# [DEF:SupersetLogger.exception:Function]
|
||||
# @PURPOSE: Записывает сообщение уровня ERROR вместе с трассировкой стека текущего исключения.
|
||||
def exception(self, msg: str, *args: Any, **kwargs: Any) -> None:
|
||||
self.logger.exception(msg, *args, **kwargs)
|
||||
# [/DEF:SupersetLogger.exception]
|
||||
# [/DEF:SupersetLogger.exception:Function]
|
||||
|
||||
# [/DEF:SupersetLogger]
|
||||
# [/DEF:SupersetLogger:Class]
|
||||
|
||||
# [/DEF:superset_tool.utils.logger]
|
||||
# [/DEF:superset_tool.utils.logger:Module]
|
||||
|
||||
Reference in New Issue
Block a user