log_setup.py

This module is used to set up and manipulate the logging configuration for utilities like debug mode.

setup_logging

Sets up the logging configuration.

get_session_logfiles

Get the path to the current debug log file

get_console_handler

Helper function to find the console StreamHandler.

get_console_level

Helper function to get the console’s log level.

set_console_level

Helper function to set the console’s log level.

debug_mode

Enable, disable, or check if we’re in debug mode.

debug_context

Context manager for running a block of code in debug_mode.

debug_wrapper

Wrapper for running a function in debug_mode.