in the QueueLister launcher add "respect_handler_level=True" so it respects the previous set log levels per handler Also split all logging tests into their own file
38 lines
986 B
Python
38 lines
986 B
Python
"""
|
|
Log logging_handling.log testing
|
|
"""
|
|
|
|
# import atexit
|
|
from pathlib import Path
|
|
# this is for testing only
|
|
from corelibs.logging_handling.log import Log
|
|
|
|
|
|
def main():
|
|
"""
|
|
Log testing
|
|
"""
|
|
script_path: Path = Path(__file__).resolve().parent
|
|
log = Log(
|
|
log_path=script_path.joinpath('log', 'test.log'),
|
|
log_name="Test Log",
|
|
log_settings={
|
|
"log_level_console": 'WARNING',
|
|
"log_level_file": 'DEBUG',
|
|
# "console_color_output_enabled": False,
|
|
}
|
|
)
|
|
|
|
log.logger.debug('[NORMAL] Debug test: %s', log.logger.name)
|
|
log.logger.info('[NORMAL] Info test: %s', log.logger.name)
|
|
log.logger.warning('[NORMAL] Warning test: %s', log.logger.name)
|
|
log.logger.error('[NORMAL] Error test: %s', log.logger.name)
|
|
log.logger.critical('[NORMAL] Critical test: %s', log.logger.name)
|
|
log.exception('[NORMAL] Exception test: %s', log.logger.name)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# __END__
|