waft.configuration.logging_config module¶
- class waft.configuration.logging_config.LoggingConfig¶
Bases:
object
Logging config settings
- static extern_logger(name: str, propogate: bool = False)¶
Return a logger object with the specified name and configuration.
- Parameters:
name (str) – Logger name
propogate (bool) – True to enable logs to propogate to the root logger, False (default) to prevent that
- Returns:
configured logger object
- Return type:
Logger
- classmethod get_file_handler(log_file_name: str)¶
Returns either a basic or time-based rotating log file handler based upon the current log file mode setting.
- Parameters:
log_file_name (str) – Log filename to open
- Returns:
Basic or time-based rotating log file handler
- Return type:
FileHandler
- log_directory: Path = PosixPath('/home/gitlab-runner/cloudflare/ztqa/waft/src/waft/logs')¶
- classmethod setup_logging() None ¶
Initializes the logger. We’ll want to call this from a session level pytest fixture in the tests before any logging happens.
e.g. @pytest.fixture(scope=’session’, autouse=True) def configure_logging():
LoggingConfig.setup_logging()
- Returns:
None