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

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

ch_json_logger-1.1.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file ch_json_logger-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ch_json_logger-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 160f6870a2d37734fb8aaf8c003257e712ccb74c3934a8acb7787877790c072b
MD5 ddccdc5c3e6f96027633f1f034e6627d
BLAKE2b-256 99fe5eafdebbaceb293054a55e3719d407af18ae2caf01a18f6537d97be74141

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