Metadata-Version: 2.1
Name: teams-logger
Version: 0.1.3
Summary: Microsoft Teams logging handler for Python
Home-page: https://github.com/AnesFoufa/python-teams-logger
Author: Anes Foufa
Author-email: anes.foufa@upply.com
Requires-Python: >=3.5,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: requests (>=2.24.0,<3.0.0)
Description-Content-Type: text/x-rst

teams-logger
===================

Python logging handler for Microsoft Teams web hook integration with simple configuration.

Installation
------------
.. code-block:: bash

    pip install teams-logger

Example
-------
Simple
''''''
.. code-block:: python

  import logging
  from teams_handler import TeamsHandler

  th = TeamsHandler(url='YOUR_WEB_HOOK_URL', level=logging.INFO)
  logging.basicConfig(handlers=[sh])
  logging.warning('warn message')

Using logger
''''''''''''
.. code-block:: python

  import logging
  from teams_handler import TeamsHandler

  logger = logging.getLogger(__name__)
  logger.setLevel(logging.DEBUG)

  th = TeamsHandler(url='YOUR_WEB_HOOK_URL', level=logging.INFO)
  sh.setLevel(logging.DEBUG)

  logger.debug('debug message')
  logger.info('info message')
  logger.warn('warn message')
  logger.error('error message')
  logger.critical('critical message')

