bhepop2.utils
Utility classes, functions and constants.
Module Contents
Classes
Logging helper class for Bhepop2. |
Functions
|
Log a message using the logging library. |
Create a logger or return the current one if already instantiated. |
Attributes
- exception bhepop2.utils.PopulationValidationError
Bases:
Exception
Raised when a population fails validation.
- exception bhepop2.utils.SourceValidationError
Bases:
Exception
Raised when an enrichment source fails validation.
- bhepop2.utils.logger_level
- bhepop2.utils.logger_name = 'bhepop2_logger'
- class bhepop2.utils.Bhepop2Logger(default_log_level=lg.DEBUG)
Logging helper class for Bhepop2.
See logging library for more information.
- log(message: str, level: int = None)
Log a message using the package logger.
- Parameters:
message – message to be logged
level – logging level
- bhepop2.utils.log(message, level)
Log a message using the logging library.
- Parameters:
message – message to log
level – logging level
- bhepop2.utils._get_logger()
Create a logger or return the current one if already instantiated.
- Returns:
logging.logger