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.get_attr('logger').setHandler(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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

umsg-1.0.3-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

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