Metadata-Version: 2.1
Name: umsg
Version: 1.0.2
Summary: _msg Library Logging
Home-page: UNKNOWN
Author: R.A. Stern
Author-email: oss@rastern.me
License: LGPL 3.0
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Logging
Requires-Python: >=3.5
Description-Content-Type: text/x-rst

==============================================
_msg: Python Library Logging Facility
==============================================

_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
============

.. code:: bash

  pip install umsg


Usage
=====

Class Logging Made Easy
-----------------------

.. code:: python

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

.. code:: python

  import logging
  import umsg

  umsg.get_attr('logger').setHandler(logging.StreamHandler())
  umsg.log('Good here')


Documentation
=============

Detailed documentation is available on `readthedocs <https://umsg.readthedocs.io/en/latest/>`_.


