Simple Python log handler for Slack using Slack webhooks.
# Installation
```sh
$ pip install slack_log_handler
```
## Usage
The only required argument for `SlackLogHandler` is the webhook URL.
You can pass the `channel`, `username`, or a dictionary of `emojis` for each
log level as named arguments.
Sample usage:
```python
import os
import logging
from slack_log_handler import SlackLogHandler
WEBHOOK_URL = os.getenv('SLACK_URL')
slack_handler = SlackLogHandler(WEBHOOK_URL)
slack_handler.setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
logger.addHandler(slack_handler)
logger.error('Oh my god, an error occurred!')
```
## Troubleshooting
On Linux, if you get an error of this kind,
```
SSL: CERTIFICATE_VERIFY_FAILED
```
make sure the `ca-certificates` package (or whatever package your distribution uses instead) is installed.
Metadata
Release files for slack_log_handler 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| slack_log_handler-0.3.0.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slack_log_handler-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / slack_log_handler-0.3.0.tar.gz
| Download URL | slack_log_handler-0.3.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d21f047706bb1c842be41eafe6366883f37df7c114a9d00e4fc1b688fa822ddb
|
|
BLAKE2b-256 checksum How to use checksums |
9c6fe7771a47f19909bf767dc7f2e072d32563d4710134c4a9e3b54af0242d5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / slack_log_handler-0.3.0-py3-none-any.whl
| Download URL | slack_log_handler-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cd785150472f05bea52958b0fc7507324407074f9d408b9850a725426c27ffe
|
|
BLAKE2b-256 checksum How to use checksums |
4e2d0ff115568d6aaabcd1a5385774e41cbecff607829cb6f965f32e3f3f914d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for slack_log_handler 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.