Make good log output easier.
ContextFilteradds fixed properties to a log record
JSONRequestFormatterformats log records as JSON output
Ensures that properties exist on a LogRecord.
Parameters: properties (list|None) – optional list of properties that will be added to LogRecord instances if they are missing
This filter implementation will ensure that a set of properties exists on every log record which means that you can always refer to custom properties in a format string. Without this, referring to a property that is not explicitly passed in will result in an ugly
Instead of spitting out a “human readable” log line, this outputs the log data as JSON.
extract_exc_record(typ, val, tb)¶
Create a JSON representation of the traceback given the records exc_info
- typ (Exception) – Exception type of the exception being handled
- instance val (Exception) – instance of the Exception class
- tb (traceback) – traceback object with the call stack
Return the frame object for the caller’s stack frame.