Logging Utilities

This module contains utilities for configuring logging.

vivarium.framework.logging.utilities.configure_logging_to_terminal(verbosity, long_format=True)[source]

Configure logging to print to the sys.stdout.

Parameters:
  • verbosity (int) – The verbosity level of the logging. 0 logs at the WARNING level, 1 logs at the INFO level, and 2 logs at the DEBUG level.

  • long_format (bool) – Whether to use the long format for logging messages, which includes explicit information about the simulation context and component in the log messages.

Return type:

None

vivarium.framework.logging.utilities.configure_logging_to_file(output_directory)[source]

Configure logging to write to a file in the provided output directory.

Parameters:

output_directory (Path) – The directory to write the log file to.

Return type:

None

vivarium.framework.logging.utilities.list_loggers()[source]

Utility function for analyzing the logging environment.