setup_logging(...) explicitly
(e.g. at app startup) — importing this package configures nothing on its own.
AccessLogQueryMaskingFilter
tai42_kit.logging.logger.AccessLogQueryMaskingFilter
uvicorn.access request line.
The access formatter REBUILDS the line from record.args — a 5-tuple whose third
element is the request path + query — and ignores a rewritten record.msg, so the
mask is applied by replacing that args element; masking the message alone silently
no-ops. Non-matching records pass through untouched. Always returns True — this
filter redacts, it never drops.
Members
filter
tai42_kit.logging.logger.AccessLogQueryMaskingFilter.filter
LoggingSettings
tai42_kit.logging.settings.LoggingSettings
TAI_-prefixed environment variables.
Attributes
Members
validate_log_level
tai42_kit.logging.settings.LoggingSettings.validate_log_level
log_level to upper case, raising when it is not a known level name.
Parameters
is_enabled_for
tai42_kit.logging.settings.LoggingSettings.is_enabled_for
level_name.
Parameters
logging_settings
tai42_kit.logging.settings.logging_settings
LoggingSettings instance.
setup_logging
tai42_kit.logging.logger.setup_logging
force=True replaces the
existing root handlers, so a repeat call (e.g. after a settings reload)
applies the new level instead of being silently ignored.
The uvicorn.access logger’s request line carries the full request URL — including
query-string capability codes and opaque params — so it is fitted with a masking filter
that redacts every query VALUE before the line is formatted. The attach is idempotent:
a repeat call never stacks a second filter.
Parameters

