Skip to main content

Library to configure Python logging easily

Project description

=======================================
daiquiri -- Python logging setup helper
=======================================

.. image:: https://travis-ci.org/jd/daiquiri.png?branch=master
:target: https://travis-ci.org/jd/daiquiri
:alt: Build Status

.. image:: https://img.shields.io/pypi/v/daiquiri.svg
:target: https://pypi.python.org/pypi/daiquiri
:alt: Latest Version

The daiquiri library provides an easy way to configure logging. It also
provides some custom formatters and handlers.

* Free software: Apache license
* Source: https://github.com/jd/daiquiri

Usage
=====

The basic usage of daiquiri is to call the `setup` function that will setup
logging with the options passed as keyword arguments.

.. literalinclude:: examples/basic.py

While it's not mandatory to use `daiquiri.getLogger` to get a logger instead of
`logging.getLogger`, it is recommended as daiquiri provides an enhanced version
of the logger. It allows any keyword argument to be passed to the logging
method and that will be available as part of the record.


Syslog support
--------------
By passing `use_syslog=True` to `daiquiri.setup`, all messages will be logged
to syslog.

Systemd journal support
-----------------------
By passing `use_journal=True` to `daiquiri.setup`, all messages will be logged
to systemd journal. All the extra parameters passed to the logging methods will
be sent as extra keys to the logging information.

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

daiquiri-0.0.0.tar.gz (9.9 kB view details)

Uploaded Source

File details

Details for the file daiquiri-0.0.0.tar.gz.

File metadata

  • Download URL: daiquiri-0.0.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for daiquiri-0.0.0.tar.gz
Algorithm Hash digest
SHA256 ed8798277a4a6d4ecefb0165e48810abbfbd5229d19801a5e4cd76cea54ecb4b
MD5 0dcb5731cb4994bc1c9a90bf18d540fc
BLAKE2b-256 73bbf48c640a238b5b19051fb58e80701ab9da745518a24b527859bb04b80f40

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