json-logger
Installation
pip3 install mapcoloniesjsonlogger
Usage Example
from MapColoniesJSONLogger.logger import generate_logger
import os
log = generate_logger('service_name', log_level='INFO', handlers=[{'type': 'rotating_file', 'path': '/var/log/service.log'}])
log.info('basic message')
log.info('message with extra fields', extra={'extra.field': 'extra_value', 'service': 'some_service'}) # supports nesting of fields
log.debug('will not be in a file')
Configuration Example
The configuration dict bellow is used by the package. For more information on logging configuration see logging.config docs
Release files for MapColoniesJSONLogger 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| MapColoniesJSONLogger-1.0.0.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| MapColoniesJSONLogger-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / MapColoniesJSONLogger-1.0.0.tar.gz
| Download URL | MapColoniesJSONLogger-1.0.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0adc1ccf87cd895fae209ac5c35ea7903a758997687381d1e1abc25986b4e29
|
|
BLAKE2b-256 checksum How to use checksums |
eeed7c6206fb9f487b8639b5a89a06cd5aa31133ef4ce70b8618d7828ba1e3ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.11
|
Release files / MapColoniesJSONLogger-1.0.0-py3-none-any.whl
| Download URL | MapColoniesJSONLogger-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f63d7f26a4c002dd57333e8d38957532c6cebe5b68876bd7e2625108be198008
|
|
BLAKE2b-256 checksum How to use checksums |
525e3b31c34dc0163a832af84ac9ff8a20f036df8d5bb6ac1842bac8221a6dbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.11
|