Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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
You can’t perform that action at this time.