Check logging¶
Checks dealing with logging module
Module private variables
- logging_strict.util.check_logging.__all__: tuple[str, str, str, str, str, str] = ("is_assume_root", "check_logger", "check_level_name", "check_level", "check_formatter", "str2int")¶
Exported objects from this module
Module objects
- logging_strict.util.check_logging.check_formatter(format_='%(levelname)s %(module)s %(funcName)s: %(lineno)d: %(message)s')¶
Check logging format str
- logging_strict.util.check_logging.check_level(level)¶
Check whether or not
levelcan be normalized into a logging level name- Parameters:
level¶ (Any | None) – str or int or
logging.INFO(, etc) orAny- Returns:
Truelevel can be normalized otherwiseFalse- Return type:
- logging_strict.util.check_logging.check_level_name(logger_name)¶
Check logger level name
- Parameters:
logger_name¶ (typing.Any |
None) – Logger name can be alogging.Logger, str- Returns:
Truecheck pass otherwiseFalse- Return type:
- logging_strict.util.check_logging.check_logger(logger)¶
Check working with a
logging.Logger- Parameters:
logger¶ (typing.Any | str |
None) – Logger name can be alogging.Loggeror str- Returns:
Would produce a normalized logger
- Return type:
- logging_strict.util.check_logging.is_assume_root(logger_name)¶
Consider all these to be root:
None
Empty string
String containing only whitespace
“root”