A Django app to log in Slack channel.
Project description
Django errors to Slack channel.
Quick start
Add “django-slack-logger” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django-slack-logger', ]Config:
SLACK_WEBHOOK_URL = "https://hooks.slack.com/services/XXXX/XXXX/XXXX" 1. To create slack app goto `https://api.slack.com/apps` and create new app 2. In `Create a Slack App` popup enter App Name you want. and select workspace and click on Create App. 3. After creating app under `Add features and functionality` tab click on `Incoming Webhooks` and make it turn on 4. Click on "Add New Webhook to Workspace" in new page select channel to post to as an app 5. Copy `Webhook URL` and set to **SLACK_WEBHOOK_URL** SLACK_ERROR_LEVEL** = ["ERROR", "CRITICAL"] # only this logs are send to slack channel "*" for all SLACK_WITH_EMAIL = False # if you want logs in mail default `False` - This will requires email django email configuration to settings.py file EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'your@gmail.com' EMAIL_HOST_PASSWORD = 'password' EMAIL_USE_TLS = True ADMINS = [('Your Name', 'your@gmail.com'),] SLACK_SHORT_MESSAGE = False
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
File details
Details for the file django-slack-logger-0.1.tar.gz.
File metadata
- Download URL: django-slack-logger-0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.19.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8ce0a2ffbb4a966e7f9008fdde0167e19bd333039e8f3abd7d44dbd21850cba
|
|
| MD5 |
e342057455be84e19a9990da9af7d48d
|
|
| BLAKE2b-256 |
cd5653105c1c2595580b1a29bafb790775be8b9d71c6afb935ac58971f2f5379
|