LINZ standard Logging format
Project description
Python LINZ Logger
Why?
LINZ has a standard logging format based loosely on the pinojs logging format:
{
"level": 30,
"time": 1571696532994,
"pid": 10671,
"hostname": "Ubuntu1",
"id": "01DQR6KQG0K60TP4T1C4VC5P74",
"msg": "SomeMessage",
"v": 1
}
Usage
pip install --upgrade linz-logger
from os import environ
from linz_logger import get_log, set_level, LogLevel
set_level(LogLevel[environ.get("LOGLEVEL", "WARNING").lower()].value)
get_log().error('Hello World', key="value")
# {"key": "value", "level": 50, "time": 1601555605017, "v": 1, "pid": 311800, "msg": "Hello World"}
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
linz_logger-0.7.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for linz_logger-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24269c9d8cc23e95422a8ce6a8b3e5e98c5c063a0eaef17830a7f87ec4b335b3 |
|
MD5 | 95d1fbd181ced8f2b6c31f49d3faf569 |
|
BLAKE2b-256 | 01ff60e441ca027f4d5d4ffc036b3cc5d50cf2e79655e8333f984472a319fd1d |