oppinionated json logger
Project description
Trustpilot Logging
Opinionated json logging module used by Trustpilot, ( based on python-json-logger by madzak )
Installation
Install the package from PyPI using pip:
pip install trustpilot-logging
Usage
import trustpilot_json_logging
logging = trustpilot_json_logging.setup_logging()
logging.warning("i'm alive")
# outputs
# {"message": "i'm alive", "Module": "root", "Severity": "INFO"}
Advanced Usage
import trustpilot_json_logging
logging = trustpilot_json_logging.setup_logging("INFO", sys.stderr, ignore={"elasticsearch":"WARNING"})
logging.info({
"message": "i just arrived",
"age": 32,
"location": "north pole"
})
# outputs
# {"message": "i just arrived", "age": 32, "location": "north pole", "Module": "root", "Severity": "INFO"}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for trustpilot-json-logging-1.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f640a86f3941ab87deedf435150abde3e487aa4525f370921210d408fc602c3e |
|
MD5 | e9342ddbf5209fc9115bdcb3143f53f5 |
|
BLAKE2b-256 | cee615e587e57416cbcd3781792ca4f63b87d2f515a68076d4b1b37dd6017f2f |
Close
Hashes for trustpilot_json_logging-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d277822cd7d8688e89fa868dfe9f66477e27cf1f9027f237ea6875ae6630f1c0 |
|
MD5 | bdff12ff55400a4514c1548dc2e13f72 |
|
BLAKE2b-256 | c3cec7dfa65ded346bc22aefd6fd088fd824a526112bbb9d292abedbbd27af8e |