Skip to content

Instantly share code, notes, and snippets.

@endofline
Created July 8, 2015 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save endofline/8ad52b917b79c1bbfaa5 to your computer and use it in GitHub Desktop.
Save endofline/8ad52b917b79c1bbfaa5 to your computer and use it in GitHub Desktop.
[hangoutsbot] stream handler example to dump all logs straight to stdout
import sys, logging
def _initialise(bot):
consoleHandler = logging.StreamHandler(stream=sys.stdout)
format = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
consoleHandler.setFormatter(format)
rootLogger = logging.getLogger()
rootLogger.addHandler(consoleHandler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment