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
File details
Details for the file python-telegram-logger-0.2.tar.gz.
File metadata
- Download URL: python-telegram-logger-0.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
313ab6d4a56e6b30785fc93b2196a1c80988b5940065db6ee9bef37d974db212
|
|
| MD5 |
8a4a7f460088005abcdb5eb60776ee55
|
|
| BLAKE2b-256 |
1bef5e5a00ecb478a3a83062be8e1295ec3c8cc2bfe3a2e06b194a41cfde078e
|