Skip to main content

Simple telegram logger

Project description

Python Telegram Logger

Simple logger which dispatch messages to a telegram in markdown format.
Uses a separate thread for a dispatching.
Support many chats.
Support big messages (over 4096 chars)


.. code-block::
pip install python-telegram-logger

Quick start

1. Configure logger with dict config:

.. code-block:: python

config = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"telegram": {
"class": "python_telegram_logger.Handler",
"token": "bot_token",
"chat_ids": [123456789, -1234567891011],

"tg": {
"level": "INFO",
"handlers": ["telegram",]

2. Use it!

.. code-block:: python

import logging
logger = logging.getLogger("tg")"test")

raise Exception("raise!")
except Exception:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-telegram-logger, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size python-telegram-logger-1.0.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page