poulet_py.config.logging module#
- setup_logging(logger, *, terminal_width=None, show_time=False, show_path=True, markup=True, rich_tracebacks=True, tracebacks_extra_lines=4, tracebacks_word_wrap=True, tracebacks_show_locals=True, level='warning', file=None)[source]#
Configure logging for the provided logger with optional rich formatting and file logging.
- Parameters:
logger (Logger) – The logger instance to configure.
terminal_width (int, optional) – The width of the terminal for rich console output. If None, the default width is used.
show_time (bool, optional) – Whether to show the time in the log output. Default is False.
show_path (bool, optional) – Whether to show the path in the log output. Default is True.
markup (bool, optional) – Whether to enable markup in the log output. Default is True.
rich_tracebacks (bool, optional) – Whether to enable rich tracebacks. Default is True.
tracebacks_extra_lines (int, optional) – Number of extra lines to show in tracebacks. Default is 4.
tracebacks_word_wrap (bool, optional) – Whether to enable word wrap in tracebacks. Default is True.
tracebacks_show_locals (bool, optional) – Whether to show local variables in tracebacks. Default is True.
level (int or str, optional) – The logging level to set for the logger. Default is warning.
file (str, optional) – The file to log to. If None, logs are output to the console.
- Return type:
None