Skip to main content

_msg Library Logging

Project description

_msg, pronounced ‘you-message’, is a module level logging utility intended for libraries, which works just as well for normal logging scenarios. The package name replaces the ‘_’ with a ‘u’ to conform with PEP8 standards.

Installation

pip install umsg

Usage

Class Logging Made Easy

from umsg import LoggingMixin

class MyClass(LoggingMixin):
    def __init__(self):
        super().__init__(prefix='MyClass')
        self.log('Logging initiated', level='debug')

Basic Module / Script Logging Too

import logging
import umsg

umsg.add_handler(logging.StreamHandler())
umsg.log('Good here')

Documentation

Detailed documentation is available on readthedocs.

Project details


Download files

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

Built Distribution

umsg-1.0.4-py3-none-any.whl (9.9 kB view hashes)

Uploaded py3

Supported by

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