view lib/logsetup.py @ 1103:b84e956771fc

sse_collector now kind of gets concurrent requests right Ignore-this: e1a104d9ae81473b86fc12fbb8ac097b darcs-hash:1bc1655b532074d97d7b8b7dd65802a9c62b6ff9
author drewp <drewp@bigasterisk.com>
date Fri, 19 Aug 2016 22:37:01 -0700
parents e379b1b4fe8b
children
line wrap: on
line source

# todo: graylog, twisted web route to some channel

import logging
logging.basicConfig(format="%(created)f %(asctime)s %(name)s %(levelname)s %(message)s")
logging.getLogger('restkit.client').setLevel(logging.WARN)
log = logging.getLogger()
log.setLevel(logging.INFO)

def enableTwistedLog():
    from twisted.python import log as twlog
    import sys
    twlog.startLogging(sys.stdout)