neurotorchmz.core.logs#
Utilities for logging in Neurotorch
Module Attributes
The root logger for NeurotorchMZ. |
|
If set to true, logs of level DEBUG are printed to the console |
|
The default logging handler to the user console |
|
The default file logging handler |
|
io.TextIOBase object used to catch stream output for the logger |
Functions
|
Should be called from the settings handler when the AppData Path is set to initialize the file handler for logging |
|
|
Starts the debugging of not started yet |
|
|
Classes
- class neurotorchmz.core.logs.StdOutCatcher#
Bases:
IOBase- _abc_impl = <_abc._abc_data object>#
- flush()#
Flush write buffers, if applicable.
This is not implemented for read-only and non-blocking streams.
- writable() bool#
Return whether object was opened for writing.
If False, write() will raise OSError.
- write(msg: str) int#
- neurotorchmz.core.logs.debugging: bool = False#
If set to true, logs of level DEBUG are printed to the console
- neurotorchmz.core.logs.file_logging_handler: RotatingFileHandler = <RotatingFileHandler /home/runner/.local/share/NeurotorchMZ/logs.txt (DEBUG)>#
The default file logging handler
- neurotorchmz.core.logs.init_file_handler(path: Path) None#
Should be called from the settings handler when the AppData Path is set to initialize the file handler for logging
- neurotorchmz.core.logs.log_exceptions_hook(exc_type: type[BaseException], exc_value: BaseException, exc_traceback: TracebackType | None = None) None#
- neurotorchmz.core.logs.logged_std_out = <neurotorchmz.core.logs.StdOutCatcher object>#
io.TextIOBase object used to catch stream output for the logger
- neurotorchmz.core.logs.logger = <Logger NeurotorchMZ (DEBUG)>#
The root logger for NeurotorchMZ. The level defaults to DEBUG to allow derived Handlers (e.g. StreamHandler, RotatingFileHandler) to set custom (higher) levels
- neurotorchmz.core.logs.start_debugging()#
Starts the debugging of not started yet
- neurotorchmz.core.logs.stream_logging_handler = <StreamHandler <stdout> (ERROR)>#
The default logging handler to the user console
- neurotorchmz.core.logs.thread_exceptions_hook(except_hook_args: _ExceptHookArgs)#