popsynth.utils.logging module

class popsynth.utils.logging.ColoredFormatter(*args, colors: Optional[Dict[str, str]] = None, **kwargs)[source]

Bases: Formatter

Colored log formatter.

__init__(*args, colors: Optional[Dict[str, str]] = None, **kwargs) None[source]

Initialize the formatter with specified format strings.

format(record) str[source]

Format the specified record as text.

class popsynth.utils.logging.MyFilter(level)[source]

Bases: object

__init__(level)[source]
filter(logRecord)[source]
class popsynth.utils.logging.LoggingState(popsynth_usr_log_handler, popsynth_console_log_handler)[source]

Bases: object

__init__(popsynth_usr_log_handler, popsynth_console_log_handler)[source]

A container to store the state of the logs.

restore_last_state()[source]
silence_logs()[source]
loud_logs()[source]
debug_logs()[source]
popsynth.utils.logging.silence_warnings()[source]

Supress warning messages in console and file usr logs.

popsynth.utils.logging.activate_warnings()[source]

Supress warning messages in console and file usr logs.

popsynth.utils.logging.update_logging_level(level)[source]
popsynth.utils.logging.silence_logs()[source]

Turn off all logging.

popsynth.utils.logging.show_progress_bars()[source]
popsynth.utils.logging.silence_progress_bars()[source]
popsynth.utils.logging.quiet_mode()[source]

Turn off all logging and progress bars.

popsynth.utils.logging.loud_mode()[source]

Turn on all progress bars and logging.

popsynth.utils.logging.activate_logs()[source]

Re-activate silenced logs.

popsynth.utils.logging.debug_mode()[source]

Activate debug in the console.

popsynth.utils.logging.silence_console_log()[source]
popsynth.utils.logging.setup_logger(name)[source]

Set up a new logger.

Parameters

name – Name of the logger