No project description provided
Project description
lignum
A teensy structured JSON logger for python.
Getting Started
Install lignum (Note: this is not yet uploaded to PyPi so you'll have to install it from source):
pip install lignum
Import and log to default stream (sys.stderr):
import lignum as log
log.info('test') # {"timestamp":1724129120,"message":"test","level":"info"}
Change streams to log to sys.stdout:
import lignum as log
import sys
log.info('test',stream=sys.stdout)
Change streams to log to a file:
import lignum as log
with open('log.log','w',encoding='utf-8') as f:
log.info('test',stream=f)
Log some extra key-value pairs:
import lignum as log
log.info('test',{'foo':'bar'}) # {"timestamp":1724129120,"message":"test","level":"info","foo":"bar"}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lignum-0.0.1.tar.gz.
File metadata
- Download URL: lignum-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb1f414f5aac7255aaa4e9f1c6434cef96d1dd8b1f0987b7c61ccecd82ab2f47
|
|
| MD5 |
7d69075bc4f6468c17ed1acec6c723d7
|
|
| BLAKE2b-256 |
473c32f1239f9067ece9b0f3ed0feda80dfb0379749b811468244e13f8dadbee
|
File details
Details for the file lignum-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: lignum-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30dd4babbc03cbc6f927fd1e3a6ee72c7f214d9578b88bc62780c54ce167b23a
|
|
| MD5 |
9fb7eaef9229a7d226c2816c87bfd981
|
|
| BLAKE2b-256 |
73d7c754ad93af32ea217f2d56c9ae5f14989e9fa5f5ed4e174cab2ff79a1711
|