Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

MozLog with the logging Module

Project description

mozlogging: MozLog with the logging Module

.. image::

.. image::

.. image::

.. image::


.. 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

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

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page