dissect.target.tools.logging
#
Module Contents#
Functions#
Simple str() serialization for the event dict values for purely aesthetic reasons |
|
Render a stack trace of an exception only if logger is configured with DEBUG or lower level, |
|
Configure logging level for dissect root logger. |
- dissect.target.tools.logging.custom_obj_renderer(logger: structlog.types.WrappedLogger, name: str, event_dict: structlog.types.EventDict) Dict[Any, str] #
Simple str() serialization for the event dict values for purely aesthetic reasons
- dissect.target.tools.logging.render_stacktrace_only_in_debug_or_less(logger: structlog.types.WrappedLogger, name: str, event_dict: structlog.types.EventDict) Dict[Any, str] #
Render a stack trace of an exception only if logger is configured with DEBUG or lower level, otherwise render str() representation of an exception.
- dissect.target.tools.logging.configure_logging(verbose_value: int, be_quiet: bool, as_plain_text: bool = True)#
Configure logging level for dissect root logger.
By default, if verbose_value is not set (equals 0) and be_quiet is False, set logging level for dissect root logger to WARNING.
If be_quiet is set to True, logging level is set to the least noisy CRITICAL level.