nessai.utils.logging#
Utilities related to logging.
Functions#
|
Configure the logger. |
|
Wrapper for configure_logger to maintain backwards compatibility. |
Module Contents#
- nessai.utils.logging.configure_logger(output=None, label='nessai', log_level='INFO', filehandler_kwargs=None, include_logger_name=False, stream=None)#
Configure the logger.
Based on the implementation in Bilby: bilby-dev/bilby
Changed in version 0.14.0: Renamed
setup_loggertoconfigure_logger.Added in version 0.14.0: Added
include_logger_nameargument.- Parameters:
- outputstr, optional
Path of to output directory.
- labelstr, optional
Label for this instance of the logger.
- log_level{‘ERROR’, ‘WARNING’, ‘INFO’, ‘DEBUG’}, optional
Level of logging passed to logger.
- filehandler_kwargsdict, optional
Keyword arguments for configuring the FileHandler. See logging documentation for details.
- include_logger_namebool, optional
If true, include the logger name in the log output. If false, only the name will be replaced with ‘nessai’.
- streamstr, file-object, optional
Stream passes to
logging.StreamHandlerto set the stream. See logging documentation for more details.
- Returns:
logging.LoggerInstance of the Logger class.
- nessai.utils.logging.setup_logger(*args, **kwargs)#
Wrapper for configure_logger to maintain backwards compatibility.
Deprecated since version 0.14.0: Use
configure_logger()instead.