A JSON logger for map colonies project
Project description
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
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file MapColoniesJSONLogger-1.0.0.tar.gz
.
File metadata
- Download URL: MapColoniesJSONLogger-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0adc1ccf87cd895fae209ac5c35ea7903a758997687381d1e1abc25986b4e29 |
|
MD5 | 8786999b1d44727d6d0d10ac374e34fe |
|
BLAKE2b-256 | eeed7c6206fb9f487b8639b5a89a06cd5aa31133ef4ce70b8618d7828ba1e3ea |
File details
Details for the file MapColoniesJSONLogger-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: MapColoniesJSONLogger-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f63d7f26a4c002dd57333e8d38957532c6cebe5b68876bd7e2625108be198008 |
|
MD5 | 213f9f47ffbbc05e703bfb29e85ba877 |
|
BLAKE2b-256 | 525e3b31c34dc0163a832af84ac9ff8a20f036df8d5bb6ac1842bac8221a6dbb |