view lib/logsetup.py @ 1120:ba0cec7e1ac9

log oneshot tracebacks Ignore-this: 4578ac8df47feb9c881790170e2168f6 darcs-hash:2967013478c94e8817e516aec5fd770ee3223fa7
author drewp <drewp@bigasterisk.com>
date Wed, 12 Oct 2016 18:37:41 -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)