"A simple django app to send your website's logs to multiple telegram chats"
Project description
A simple django app to send your website’s logs to multiple telegram chats
Configuration
Follow these steps to configure django-telegram-sentry in your Django project:
Install the package using pip:
pip install django-telegram-sentryAdd django_telegram_sentry to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [ ..., 'django_telegram_sentry', ]
Include the django_telegram_sentry in your LOGGING settings in settings.py:
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'telegram': { 'level': 'ERROR', # Use any level above DEBUG 'class': 'django_telegram_sentry.handler.TelegramHandler', 'token': 'your-telegram-bot-token', 'receiver_list': ['chat-id-1', 'chat-id-2', ...], # Optionally use proxies as needed: 'proxies': { 'http': 'http://server_address:port', 'https': 'https://server_address:port' } }, }, 'root': { 'handlers': ['telegram', 'other-handler', ...], 'level': 'ERROR', }, }
Exceptions that occur when calling Telegram’s API will be stored in a file called telegram_errors.log.
Result
After following these steps, your Django app will send logs to the specified Telegram chats. Here’s an example of what you can expect:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_telegram_sentry-1.0.1.tar.gz.
File metadata
- Download URL: django_telegram_sentry-1.0.1.tar.gz
- Upload date:
- Size: 111.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
631977f8f0aad0051f6bbfe425dde26bf3f63797cafe964c2573854389ee4ac0
|
|
| MD5 |
516c7fd42c19c9dcdd9d5fccd60b87a5
|
|
| BLAKE2b-256 |
c052ff17f3bf8688e2d8129ee9891342fcd7c3ea4f50d5075509554c252c809e
|
File details
Details for the file django_telegram_sentry-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_telegram_sentry-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f054064faf37603c4131d0a616066282c92dcc56a0527d5d52d3d0522ac9b25a
|
|
| MD5 |
27b7bf2acaa609fe609955c0c8d83f52
|
|
| BLAKE2b-256 |
5ef813714dbef818b6f68b2f7a0e42d4ba654a670ffebaaa3067d0359a47535a
|