Skip to main content

MozLog with the logging Module

Project description

mozlogging: MozLog with the logging Module
========================================

.. image:: https://img.shields.io/pypi/v/mozlogging.svg
:target: https://pypi.python.org/pypi/mozlogging

.. image:: https://img.shields.io/pypi/l/mozlogging.svg
:target: https://pypi.python.org/pypi/mozlogging

.. image:: https://img.shields.io/pypi/wheel/mozlogging.svg
:target: https://pypi.python.org/pypi/mozlogging

.. image:: https://img.shields.io/pypi/pyversions/mozlogging.svg
:target: https://pypi.python.org/pypi/mozlogging


Example:

.. code-block:: python

>>> import logging
>>> from mozlogging import MozLogFormatter
>>> logger = logging.getLogger('example')
>>> handler = logging.StreamHandler()
>>> handler.setFormatter(MozLogFormatter())
>>> logger.addHandler(handler)
>>> logger.error({'dict': 1, 'of': 2, 'fields': 3}, 'my.message.type')
{"EnvVersion": "2.0", "Fields": {"dict": 1, "fields": 3, "of": 2}, "Logger": "example", "Severity": 3, "Timestamp": 1489366186847323648, "Type": "my.message.type"}


Project details


Release history Release notifications

Download files

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

Files for mozlogging, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size mozlogging-0.1.0-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mozlogging-0.1.0.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page