log.py¶
Performs logging of messages for tracking runs.
- class log.PrintLog(log_name=None, print_handler=None)¶
Redirects standard out and err output to a file and also displays.
- __dict__ = mappingproxy({'__module__': 'log', '__doc__': 'Redirects standard out and err output to \n a file and also displays. \n ', '__init__': <function PrintLog.__init__>, 'write': <function PrintLog.write>, 'flush': <function PrintLog.flush>, '__dict__': <attribute '__dict__' of 'PrintLog' objects>, '__weakref__': <attribute '__weakref__' of 'PrintLog' objects>, '__annotations__': {}})¶
- __init__(log_name=None, print_handler=None)¶
Initializes the logger.
- __module__ = 'log'¶
- __weakref__¶
list of weak references to the object (if defined)
- flush()¶
Flushes the handler buffers.
- write(msg, level=20)¶
Writes data to the log and also echos in a display if specified.
- log.setup_log(base_dir)¶
Sets up logs.