Logging

The logging observer adds request-specific metadata to log lines coming out of your application.

Configuration

No configuration is necessary, this observer is always enabled when you call configure_observers().

If your application is run with baseplate-serve, logging can be controlled with Python’s standard logging configuration. See Logging for more information.

Outputs

When used with baseplate-serve, log lines look like:

17905:7296338476964580186:baseplate.lib.metrics:DEBUG:Blah blah
^     ^                   ^                     ^     ^
|     |                   |                     |     Log message
|     |                   |                     Log level
|     |                   Name of the logger
|     Trace ID of the request
Process ID

Direct Use

Any log messages emitted with the Python standard logging interfaces will be annotated by this observer.