thinlog.settings module#
Typed dataclass matching the logging.config.dictConfig() schema.
- class thinlog.settings.LoggingSettings(version: int = 1, formatters: dict[str, dict[str, ~typing.Any]]=<factory>, filters: dict[str, dict[str, ~typing.Any]]=<factory>, handlers: dict[str, dict[str, ~typing.Any]]=<factory>, loggers: dict[str, dict[str, ~typing.Any]]=<factory>, incremental: bool = False, disable_existing_loggers: bool = False, root: dict[str, ~typing.Any]=<factory>)[source]#
Bases:
objectConfiguration container for
logging.config.dictConfig().All fields mirror the keys accepted by
logging.config.dictConfig(). Convert to a plain dict withdataclasses.asdict()before passing todictConfig(this is handled automatically byconfigure_logging()).- Parameters:
version – Schema version – must be
1.formatters – Formatter definitions keyed by name.
filters – Filter definitions keyed by name.
handlers – Handler definitions keyed by name.
loggers – Logger definitions keyed by name.
incremental – If
True, merge into the existing configuration.disable_existing_loggers – If
True, disable loggers not in loggers.root – Configuration for the root logger.
- disable_existing_loggers: bool = False#
- filters: dict[str, dict[str, Any]]#
- formatters: dict[str, dict[str, Any]]#
- handlers: dict[str, dict[str, Any]]#
- incremental: bool = False#
- loggers: dict[str, dict[str, Any]]#
- root: dict[str, Any]#
- version: int = 1#