swh.core.logging module#

Logging module providing common swh logging configuration. This only depends on python core library.

exception swh.core.logging.BadLogLevel[source]#

Bases: ValueError

swh.core.logging.validate_loglevel(value: str) Tuple[str | None, int][source]#

Validate a single loglevel specification, of the form LOGLEVEL or module:LOGLEVEL.

swh.core.logging.logging_configure(log_levels: List[Tuple[str, int]] = [], log_config: Path | None = None) str[source]#

A default configuration function to unify swh module logger configuration.

The log_config YAML file must conform to the logging.config.dictConfig schema documented at https://docs.python.org/3/library/logging.config.html.

Returns:

The actual root logger log level name defined.