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.6.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for linz_logger-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b15e59399af1e289d59e39f68ab6f9d5abcc5b648146ff6abd52aefaad3154f2 |
|
MD5 | 1622ca4457fd26976176c043684e3411 |
|
BLAKE2b-256 | 459a74812d248389488177d41ee722d4f4725633d57dcb5dade07f946e8fe65e |