A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/borntyping/jsonlog below:

GitHub - borntyping/jsonlog: Structured logging tools

A set of Python modules for working with structured JSON logs.

You can use jsonlog as a drop-in replacement for logging:

import jsonlog

jsonlog.warning("Hello world.")
{"timestamp": "2019-06-21T19:06:25.285730", "level": "WARNING", "name": "root", "message": "Hello world."}

See the jsonlog README for documentation and examples.

Pipe line-delimited JSON into the jsonlog CLI:

python jsonlog-cli/docs/example.py | jsonlog
timestamp='2020-06-15T13:27:41.909782' name='example' message='debug level log message'
timestamp='2020-06-15T13:27:41.909882' name='example' message='info level log message'
timestamp='2020-06-15T13:27:41.909940' name='example' message='warning level log message'
timestamp='2020-06-15T13:27:41.909990' name='example' message='error level log message'
timestamp='2020-06-15T13:27:41.910040' name='example' message='error level log message with traceback'

    Traceback (most recent call last):
      File "jsonlog-cli/docs/example.py", line 15, in <module>
        1 / 0
    ZeroDivisionError: division by zero

timestamp='2020-06-15T13:27:41.910239' name='example' message='critical level log message'

See the jsonlog-cli README for documentation and examples.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4