Metadata-Version: 2.1
Name: MapColoniesJSONLogger
Version: 1.0.0
Summary: A JSON logger for map colonies project
Home-page: https://github.com/MapColonies/json-logger
Author: MapColonies
Author-email: mapcolonies@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: ecs-logging (==0.5.0)

# json-logger

## Installation
```
pip3 install mapcoloniesjsonlogger
```

## Usage Example
```py
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](https://docs.python.org/3.6/library/logging.config.html#module-logging.config) docs


