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.

Files for ch-json-logger, version 1.1.4
Filename, size File type Python version Upload date Hashes
Filename, size ch_json_logger-1.1.4-py3-none-any.whl (4.3 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page