Skip to content

Asynchronous sending important logs directly to telegram with python logging module

Notifications You must be signed in to change notification settings

didhat/aio-telegram-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aio-telegram-log

Basic library for sending log to telegram, using python logging module(like handler), but do it asynchronously.

Usage

Just set telegram handler in your logging settings

...
"handlers": {
    "default": {
        "formatter": "default",
        "level": "DEBUG",
        "class": "logging.StreamHandler",
        "stream": "ext://sys.stdout",
    },
    "telegram": {
        "class": "tghandler.handler.TelegramLoggingHandler",
        "token": "input your token",
        "chat_ids": [0, 1],
        "level": "ERROR",
        "formatter": "default",
    },
},
...

About

Asynchronous sending important logs directly to telegram with python logging module

Resources

Stars

Watchers

Forks

Packages

No packages published