Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

JSON logger for python

Project description

Данная библиотека позволяет легко и безболезненно логировать ваши метрики в файл, чтобы потом скормить Ваш лог Kibana.

Коротенькая инструкция

Установка

sudo pip3 install -r requirements.txt

Код

from json_logger import CustomJsonLogger

logger = CustomJsonLogger(__name__)

logger.error("oshibka",params={"email":"mojkot@mail.ru"})

Результат

{"message": "oshibka", "email": "mojkot@mail.ru", "level": "ERROR", "time": "2017-05-16T11:17:11.731508", "log_id": "0b2c5904-dad5-4b3b-9f1e-40b5fc5c96b9"}

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ch_json_logger-1.1.4-py3-none-any.whl (4.3 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page