https://github.com/globocom/tornado-logging-slack
Log Tornado errors to a Slack channel
https://github.com/globocom/tornado-logging-slack
Last synced: 7 months ago
JSON representation
Log Tornado errors to a Slack channel
- Host: GitHub
- URL: https://github.com/globocom/tornado-logging-slack
- Owner: globocom
- Archived: true
- Created: 2016-02-16T12:37:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T20:12:57.000Z (over 10 years ago)
- Last Synced: 2025-11-28T06:49:48.538Z (8 months ago)
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 5
- Watchers: 12
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/globocom/tornado-logging-slack)
[](https://coveralls.io/github/globocom/tornado-logging-slack?branch=master)
[](https://badge.fury.io/py/tornado-logging-slack)
# Tornado Slack logging
Log Tornado errors to a [Slack](https://slack.com/) channel without blocking the event loop. Based on [mathiasose/slacker_log_handler](https://github.com/mathiasose/slacker_log_handler)
## Install
with pip:
```bash
pip install tornado-logging-slack
```
## Usage
```python
import tornado_logging_slack
if __name__ == '__main__':
tornado_logging_slack.auto_setup()
IOLoop.current().start()
```
## Enviroment variables
- SLACK_APIKEY: Generate a key at https://api.slack.com;
- SLACK_CHANNEL: Set which channel you want to post to;
- SLACK_USERNAME: The username that will post to Slack;
- SLACK_PROXY_HOST: HTTP proxy hostname if you use a proxy;
- SLACK_PROXY_PORT: HTTP proxy port, default: 3128;
- SLACK_PROXY_USERNAME: HTTP proxy username;
- SLACK_PROXY_PASSWORD: HTTP proxy password;
**Note:** A proxy only works with Tornado's `curl_httpclient`.
## Contributing
Fork, patch, test and send a pull request.