f_lib.logging.settings package

Settings for logging.

class f_lib.logging.settings.ConsoleLoggingSettings[source]

Bases: BaseModel

Console logging settings.

enable_markup: bool

Enable rich markup in console logs.

enable_rich_tracebacks: bool

Enable using rich to highlight tracebacks.

log_format: str | None

Custom log format to use instead of using default formats.

show_level: bool

Show a column for the level of each log message.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

show_path: bool

Show the path to the original log call.

show_time: bool

Show a column for time with the log messages.

time_format: str

Format to use when showing the time column.

show_time must be enabled for this to take effect.

tracebacks_show_locals: bool

Show local variables in trackbacks.

tracebacks_theme: str

Theme from pygments to use when highlighting tracebacks.

class f_lib.logging.settings.LoggingSettings[source]

Bases: BaseSettings

Top-level logging settings.

console: ConsoleLoggingSettings

Settings for console logging.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

classmethod settings_customise_sources(settings_cls: type[BaseSettings], init_settings: PydanticBaseSettingsSource, env_settings: PydanticBaseSettingsSource, dotenv_settings: PydanticBaseSettingsSource, file_secret_settings: PydanticBaseSettingsSource) tuple[PydanticBaseSettingsSource, ...][source]

Enable pyproject.toml source.

class f_lib.logging.settings.PyprojectTomlConfigSettingsSource[source]

Bases: TomlConfigSettingsSource

pyproject.toml config settings source.

__init__(settings_cls: type[BaseSettings], toml_file: Path | None = None) None[source]

Instantiate class.