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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0b206cf82496a04df492e63562dd5321962bd4d0c044e5506d3940ff3e1865b |
|
MD5 | b19cfee8f65cebcf7776a00980ebf632 |
|
BLAKE2b-256 | e796f00fca25bb3894226d68b6d31339d56ddc80eeae3558104b4efd218557e7 |
Close
Hashes for licenseware_logblocks-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50286de171e39ce07c8ca7d4adda6b42dd2b214a1db705e79174afe9f124e253 |
|
MD5 | d8f8bbe73132de58480385b4a7e080e5 |
|
BLAKE2b-256 | 9b14daee6a5df7c6b800604c61a18be4c6ae3f0afca10061f676f9691f0e6184 |