gws.core.log

Logging facility.

Source code: gws.core.log

Module Contents

class gws.core.log.Level
CRITICAL = 50
ERROR = 40
WARN = 30
WARNING = 30
INFO = 20
DEBUG = 10
NOTSET = 0
ALL = 0
gws.core.log.set_level(level: int | str)
gws.core.log.log(level: int, msg: str, *args, **kwargs)
gws.core.log.critical(msg: str, *args, **kwargs)
gws.core.log.error(msg: str, *args, **kwargs)
gws.core.log.warning(msg: str, *args, **kwargs)
gws.core.log.info(msg: str, *args, **kwargs)
gws.core.log.debug(msg: str, *args, **kwargs)
gws.core.log.exception(msg: str = '', *args, **kwargs)
gws.core.log.if_debug(fn, *args)

If debugging, apply the function to args and log the result.

gws.core.log.exception_backtrace(exc: BaseException | None) list

Exception backtrace as a list of strings.