initΒΆ

Log initialization

Logging Configuration.

src.server.lib.log.__init__.default_processors = [<function merge_contextvars>, <function drop_health_logs>, <function add_log_level>, <structlog.processors.TimeStamper object>, <function msgspec_json_renderer>]

Default processors to apply to all loggers. See structlog.processors for more information.

src.server.lib.log.__init__.stdlib_processors = [<structlog.processors.TimeStamper object>, <function add_log_level>, <structlog.stdlib.ExtraAdder object>, <server.lib.log.utils.EventFilter object>, <function ProcessorFormatter.remove_processors_meta>]

Processors to apply to the stdlib logger. See structlog.stdlib for more information.

src.server.lib.log.__init__.config = LoggingConfig(version=1, incremental=False, disable_existing_loggers=False, filters=None, propagate=True, formatters={'standard': {'()': <class 'structlog.stdlib.ProcessorFormatter'>, 'processors': [<structlog.processors.TimeStamper object>, <function add_log_level>, <structlog.stdlib.ExtraAdder object>, <server.lib.log.utils.EventFilter object>, <function ProcessorFormatter.remove_processors_meta>]}}, handlers={'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG', 'formatter': 'standard'}, 'queue_listener': {'class': 'litestar.logging.standard.QueueListenerHandler', 'level': 'DEBUG', 'formatter': 'standard'}}, loggers={'uvicorn.access': {'propagate': False, 'level': 30, 'handlers': ['queue_listener']}, 'uvicorn.error': {'propagate': False, 'level': 20, 'handlers': ['queue_listener']}, 'litestar': {'level': 'INFO', 'handlers': ['queue_listener'], 'propagate': False}}, root={'level': 'INFO', 'handlers': ['queue_listener']}, configure_root_logger=True, log_exceptions='debug', traceback_line_limit=20, exception_logging_handler=<function _default_exception_logging_handler_factory.<locals>._default_exception_logging_handler>)

Pre-configured log config for application deps.

While we use structlog for internal app logging, we still want to ensure that logs emitted by any of our dependencies are handled in a non- blocking manner.

src.server.lib.log.__init__.configure(processors: Sequence[Processor]) None[source]

Call to configure structlog on app startup.

The calls to get_logger() in controller.py to the logger that is eventually called after this configurator function has been called. Therefore, nothing should try to log via structlog before this is called.

Parameters:

processors – A list of processors to apply to all loggers

Returns:

None

src.server.lib.log.__init__.get_logger(*args: Any, **kwargs: Any) BoundLogger[source]

Return a configured logger for the given name.

Parameters:
Returns:

A configured logger instance

Return type:

Logger