Skip to main content

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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ch_json_logger-1.1.3-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

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