chaturbate_poller.logging_config
Logging configuration for the chaturbate_poller package.
Attributes
Classes
Filter to sanitize sensitive data from logs. |
|
Custom JSON Formatter for structured logging. |
Functions
|
Sanitize sensitive data like URLs and tokens. |
|
Set up logging configuration. |
Module Contents
- chaturbate_poller.logging_config.URL_REGEX
- chaturbate_poller.logging_config.TOKEN_REGEX
- chaturbate_poller.logging_config.timezone_name
- chaturbate_poller.logging_config.sanitize_sensitive_data(arg: str | float) str | int | float [source]
Sanitize sensitive data like URLs and tokens.
- Parameters:
arg (str | float) – The argument to sanitize.
- Returns:
Sanitized data.
- Return type:
str | int | float
- class chaturbate_poller.logging_config.SanitizeSensitiveDataFilter(name='')[source]
Bases:
logging.Filter
Filter to sanitize sensitive data from logs.
- class chaturbate_poller.logging_config.CustomJSONFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]
Bases:
json_log_formatter.JSONFormatter
Custom JSON Formatter for structured logging.
- json_record(message: str, extra: dict[str, Any], record: logging.LogRecord) dict[str, Any] [source]
Add extra fields to the JSON log record.
- Parameters:
message (str) – The log message.
extra (dict[str, Any]) – Additional log data.
record (logging.LogRecord) – The log record.
- Returns:
Enhanced log record.
- Return type:
dict[str, Any]