Simple telegram threaded logger
Project description
=====
Python Telegram Logger
=====
Provide simple logger which posts messages to a telegram in markdown format. Use a separate thread for a dispatching. Support many chats
Quick start
-----------
1. Add logger to your dict config:
.. code-block:: python
config = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"telegram": {
"class": "python_telegram_logger.TelegramHandler",
"token": "token",
"chat_ids": [123456789, -1234567891011],
}
},
"tg": {
"level": "INFO",
"handlers": ["telegram",]
}
}
2. Use it!
.. code-block:: python
import logging
logger = logging.getLogger("tg")
logger.info("TEST")
Python Telegram Logger
=====
Provide simple logger which posts messages to a telegram in markdown format. Use a separate thread for a dispatching. Support many chats
Quick start
-----------
1. Add logger to your dict config:
.. code-block:: python
config = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"telegram": {
"class": "python_telegram_logger.TelegramHandler",
"token": "token",
"chat_ids": [123456789, -1234567891011],
}
},
"tg": {
"level": "INFO",
"handlers": ["telegram",]
}
}
2. Use it!
.. code-block:: python
import logging
logger = logging.getLogger("tg")
logger.info("TEST")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python-telegram-logger-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb32a1b3f9f98f0384d74da35ea165e195f7a651618c44ec862074d888661df2 |
|
MD5 | 4d7dd6501eb4e47d0bb9788e06033258 |
|
BLAKE2b-256 | 533ea910a00b6300990370e276295dc6a3b8b8149b907e5bcf57290fb5202718 |