view lib/logsetup.py @ 217:163cfa384372

enableTwistedLog Ignore-this: 75e28eaa4d1acc2db92144a0620eb9b8
author drewp@bigasterisk.com
date Sun, 03 Jan 2016 02:28:44 -0800
parents 26a6cf58743d
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)