Python library for configuring logs in the FIAAS way
Project description
This library configures logging according to the current FIAAS recomended format.
Usage:
from fiaas_logging import init_logging init_logging(format="json")
This would configure your application to emit JSON formatted logs on STDOUT.
Available options (all are keyword arguments to init_logging):
Key |
Possible values |
Meaning |
---|---|---|
format |
json/plain |
Select either JSON logging, or plain text logging |
debug |
True/False |
Enable debug logging |
The plain format contains the fields timestamp, level name, message, logger name, and thread name. In the json format, there are more fields, with more detail. The fields in the json output are:
Name |
Meaning |
---|---|
@timestamp |
Timestamp of message |
@version |
Version, legacy field to support ELK stack at FINN (to be removed?) |
LocationInfo |
A structure describing the code location that logged this message |
message |
The actual log message |
extras |
A structure containing extra fields. Used for thread context |
throwable |
A formatted stacktrace if the log message is the result of an exception |
Changes since last version
7d96bdc: Add pip cache to gitignore
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fiaas_logging-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47bf999d3734f066fe9911bbc65dbae2576790554e22038615f802322f10b9c1 |
|
MD5 | 3d6b86fbd7a94a06eab2482634f34262 |
|
BLAKE2b-256 | 3ca4bf2b48bf3c8e8e85521a3660f6c0ac65fa1cf51e7b361b95d5e6618134de |