Microsoft Teams logging handler for Python
Project description
Python logging handler for Microsoft Teams web hook integration with simple configuration.
Installation
pip install teams-logger
Example
Simple
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
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')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
teams-logger-0.1.2.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for teams_logger-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a10dd61053d63a05c01a1ff1e082fa5fca311ea4024fbc90e472631385017e |
|
MD5 | d29f98e8b23c61b8419f5ed7f10432a1 |
|
BLAKE2b-256 | a9be688116b1b523c076618bdad5c0c278668533080085e877bcc7244e576cf1 |