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
Close
Hashes for ch_json_logger-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5827e99a830d69d8959a53ff6f94c54109d338021b3de7c507ac6cc4c0e30f50 |
|
MD5 | ed93656d69f1478836bf85d0c3a4928a |
|
BLAKE2b-256 | 242faffc2ac822a17a6e26a32750779611f81ced81532717f5038ea7e5bb7fae |