Post formatted log messages to slack, mentioning users when error ocurrs
Project description
licenseware-logblocks
Installation
pip install licenseware-logblocks
How it works?
Having a log stream, you can read line by line and send it to logblocks:
log_stream() { while true; do echo $RANDOM; sleep 1; done; }
while IFS= read -r line; do echo $line | logblocks $line; done < <(log_stream)
SLACK_TAGGED_USERS_IDS
will be tagged on all ERRORS
Requirements
Environment variables:
SLACK_TAGGED_USERS_IDS
(ex:export SLACK_TAGGED_USERS_IDS="<@U02CS9QL0JK>, <@U02U2KQ7N3Y>, <@U030JAJF5RV>, <@U02SDCAHJH3>, <@UHW04RBGT>"
);SLACK_CHANNEL_WEBHOOK_URL
(ex:export SLACK_CHANNEL_WEBHOOK_URL=https://hooks.slack.com/services/etc/etc/etc
)
Project details
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
Close
Hashes for licenseware-logblocks-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddbdfc997e0feaf1e16db9a521605c55478e5dd879edcc011674067c2cfff2ee |
|
MD5 | 0664518fdbe8bd5405abb3f9eb40d560 |
|
BLAKE2b-256 | 4f3d698ae02cfd56c200d8f4b8f47497139f378db63f08928b727b90723caf4a |
Close
Hashes for licenseware_logblocks-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4aa51243999dffb54a0ef1b8aa2ef60b97530ab0b2d56983e26a8d97fd2092da |
|
MD5 | 89dabe8dd99599210debe11e2d906ce1 |
|
BLAKE2b-256 | 38e87453df1f9f374d69b5363d8a3d3421a98d1f2c66ee192534dc4576435b54 |