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
32 lines
642 B
Python
32 lines
642 B
Python
"""
|
|
Log logging_handling.log testing
|
|
"""
|
|
|
|
# import atexit
|
|
from pathlib import Path
|
|
from multiprocessing import Queue
|
|
# this is for testing only
|
|
from queue_logger.log_queue import QueueLogger
|
|
|
|
|
|
def main():
|
|
"""
|
|
Log testing
|
|
"""
|
|
script_path: Path = Path(__file__).resolve().parent
|
|
|
|
log_queue: 'Queue[str]' = Queue()
|
|
log_q_legacy = QueueLogger(
|
|
log_file=script_path.joinpath('log', 'test_queue_legacy.log'),
|
|
log_name="Test Log Queue",
|
|
log_queue=log_queue
|
|
)
|
|
log_q_legacy.mlog.info('Log test: %s', 'Queue Legacy')
|
|
# log_q.stop_listener()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# __END__
|