Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MapColoniesJSONLogger-1.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

MapColoniesJSONLogger-1.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

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

Hashes for MapColoniesJSONLogger-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a0adc1ccf87cd895fae209ac5c35ea7903a758997687381d1e1abc25986b4e29
MD5 8786999b1d44727d6d0d10ac374e34fe
BLAKE2b-256 eeed7c6206fb9f487b8639b5a89a06cd5aa31133ef4ce70b8618d7828ba1e3ea

See more details on using hashes here.

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

Hashes for MapColoniesJSONLogger-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f63d7f26a4c002dd57333e8d38957532c6cebe5b68876bd7e2625108be198008
MD5 213f9f47ffbbc05e703bfb29e85ba877
BLAKE2b-256 525e3b31c34dc0163a832af84ac9ff8a20f036df8d5bb6ac1842bac8221a6dbb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page