{"repo":"guyshe/telegram_handler","free":true,"listed":false,"github":"https://github.com/guyshe/telegram_handler","clone":"git clone https://github.com/guyshe/telegram_handler.git","description":"Logging handler that sends log messages directly to either a telegram channel or chat","language":"Python","stars":10,"topics":["logger","logging","telegram","handler","bot","python3","logging-library","logging-handlers","screenshots","simple"],"license":null,"category":"chat-messaging","readme_excerpt":"Telegram Handler Drop-in Python logging.Handler that forwards log records to a Telegram chat or channel with buffering, retries, and a background worker so your app stays responsive. Highlights - Works with channel usernames or chat IDs; just pass your bot token and destination. - Buffered writer batches messages and trims overlong payloads to avoid Telegram limits. - Automatic retries with backoff when Telegram throttles or transient network errors occur. - Thread-safe background thread keeps log emission non-blocking for the main application. - Simple to slot into existing logging setups alongside stream/file handlers. Install Use cases - Alert on errors from small services without standing up extra infrastructure. - Send deploy and health logs to a shared team channel. - Keep local dev logs visible on your phone during long runs. Quickstart What you need - Create a bot with BotFather to obtain BOT TOKEN . - Create a channel or use a chat; add your bot as an admin so it can post messages. - Find the chat ID if you prefer using IDs instead of a public channel name (guide here). Usage notes - bot token : token returned by BotFather (keep it secret; do not commit it). - channel : public channel username (without the leading @ ) or an integer chat ID. - Messages are buffered and flushed every few seconds in a daemon thread to keep logging non-blocking. - Payloads are trimmed to stay under Telegram's message size limits; long bursts are split across flushes. - The handler automa","default_branch":null,"files":null,"tree":[],"storefront":"/r/guyshe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/guyshe/telegram_handler/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}