log_utils

s3l.utils.log_utils.get_logger(name='s3l', level=None)[source]

Fetch the logger with name and level.

Parameters:
  • name (string, optional (default="s3l")) –
  • level (const int, optional(default=None)) – A value in the set {logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL} If None, the returned logger will have the default logging level set by update_default_level.
Returns:

logger – Call logger.[debug/info/warning/error/critical](msg, *arg, **kwargs) to add logging. Refer to https://docs.python.org/3/howto/logging.html.

Return type:

A logger object

s3l.utils.log_utils.init_fh()[source]

Initialize the global file_handler for LOGGER.

s3l.utils.log_utils.strftime(t=None)[source]
s3l.utils.log_utils.update_default_level(default_level)[source]

Update the logging level for logger.

Parameters:default_level (const int) – A value in the set {logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL}
s3l.utils.log_utils.update_default_logging_dir(default_logging_dir)[source]

Update the dir to place the logging file.

Parameters:default_logging_dir (string) –