Skip to main content

A teensy structured JSON logger for python.

Project description

lignum

A teensy structured JSON logger for python.

Getting Started

Install lignum:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lignum-0.0.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lignum-0.0.2-py2.py3-none-any.whl (1.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file lignum-0.0.2.tar.gz.

File metadata

  • Download URL: lignum-0.0.2.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

Hashes for lignum-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3db9d044e69f82c11403c89fb9d914d2c47d4a4d0c47590a66c5e8c9c4dba74d
MD5 74b40b57043f1ae29b919ca90ad9300c
BLAKE2b-256 b4dcc36b81af77a5627ea54ef367794d68a0da2ec07b7800723ff8b0c0115fb2

See more details on using hashes here.

File details

Details for the file lignum-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: lignum-0.0.2-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

Hashes for lignum-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e9e19e27ea59c647bcb7d473320643e619d65d12f272bfaed2745b51b9b90183
MD5 ed8ed4e1d8e44cef40776eba727ff801
BLAKE2b-256 f9990b031eee228b47529b145fb6c8d22ca8998b0a4a6476bd20740f6d97d069

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page