Skip to main content

Simplified event and data formatting and logging.

Project description

Documentation Latest Version Wheel Available Python versions MIT License

Simplified event and data formatting and logging.

Kaviar aids developers in need of a convenient way to produce structured representation of key-value pairs for logging or representation with a fixed syntax suit suited for later evaluation or just aesthetic reasons.

Example

Logging a certain event:

import logging
from kaviar import EventKvLoggerAdapter

logging.basicConfig(level=logging.DEBUG)
logger = EventKvLoggerAdapter.get_logger(__name__)
logger.info('NEW_CLIENT', client_id=42, peer_name='93.184.216.119')

Separating the event definition from actual logging:

import logging
from functools import partial
from kaviar import EventKvLoggerAdapter

logging.basicConfig(level=logging.DEBUG)
logger = EventKvLoggerAdapter.get_logger(__name__)

log_event = partial(logger.define_logger_func(logging.INFO,
                                              'server peer_name'),
                    'NEW_CLIENT')

log_event('example.org', '93.184.216.164')

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

kaviar-1.0.zip (22.3 kB view details)

Uploaded Source

Built Distribution

kaviar-1.0-py2.py3-none-any.whl (11.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kaviar-1.0.zip.

File metadata

  • Download URL: kaviar-1.0.zip
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kaviar-1.0.zip
Algorithm Hash digest
SHA256 e97ae8a842161488664909bd25eb356b29eb7938d51768de036b452d50e7230f
MD5 de1d799c914969f52f633f5b178d703e
BLAKE2b-256 a40c0df8f30a309ad359990aa96e3fe98670b13e916f317a080b9c470d82ec0f

See more details on using hashes here.

File details

Details for the file kaviar-1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kaviar-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a9abe1cb48a2ac5d6e8e364e4672cc18a49cbec9cddadc697268d30f308e499
MD5 c48e622ed24e913c91b98bceb7a442c4
BLAKE2b-256 1d67ecf4df0eebb55101dd86ecbe68088a197ed1de36b3f0ef21c3c41ae1d053

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