lsst.sims.ocs.setup.log module

class lsst.sims.ocs.setup.log.LoggingLevel[source]

Bases: enum.Enum

Handle some extra logging levels.

EXTENSIVE = 5
TRACE = 2
WORDY = 15
lsst.sims.ocs.setup.log.configure_logging(console_detail, file_detail, log_port=9020)[source]

Configure logging for the application.

Configuration for both the console and file (via socket) logging for the application.

Parameters:
  • console_detail (int) – The requested detail level for the console logger.
  • file_detail (int) – The requested detail level for the socket (file) logger.
  • log_port (int, optional) – An alternate port for the socker logger.
lsst.sims.ocs.setup.log.generate_logfile_path(log_file_path='log', session_id='1000')[source]

Generate the full log file path.

Parameters:
  • log_file_path (str, optional) – The location to write the log file.
  • session_id (str, optional) – The OpSim session ID tag.
Returns:

str – The full path of the log file.

lsst.sims.ocs.setup.log.set_log_levels(verbose=0)[source]

Set detail levels for console and file logging systems.

This function sets the detail levels for console and file (via socket) logging systems. These levels are keys into the DETAIL_LEVEL dictionary.

Parameters:verbose (int) – The requested verbosity level.
Returns:(int, int) – A tuple containing the console detail level and the file detail level respectively.