Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

globocom/tornado-logging-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status PyPI version

Tornado Slack logging

Log Tornado errors to a Slack channel without blocking the event loop. Based on mathiasose/slacker_log_handler

Install

with pip:

pip install tornado-logging-slack

Usage

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.

About

Log Tornado errors to a Slack channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published