Metadata-Version: 2.1
Name: aio-telegram-log-handler
Version: 1.0.1
Summary: Package for send some important logs directly to telegram
Author: Daniil Solynin
Author-email: Daniil Solynin <solynynd@gmail.com>
Keywords: telegram,logging,async
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: aiohttp (>=3.8.4)
Provides-Extra: linters
Requires-Dist: isort ; extra == 'linters'
Requires-Dist: mypy ; extra == 'linters'
Requires-Dist: black ; extra == 'linters'
Provides-Extra: test
Requires-Dist: pytest (>=7) ; extra == 'test'
Requires-Dist: pytest-asyncio (>=0.21) ; extra == 'test'

# 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",
        },
    },
    ...


