view lib/logsetup.py @ 1133:114ca7fd9d01

IR remote rule Ignore-this: 901771de421a81129f2ddf4316af91d9 darcs-hash:a037a1bcf9631ac214fe1e61ff42fb00f25cb451
author drewp <drewp@bigasterisk.com>
date Sat, 03 Feb 2018 14:38:10 -0800
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)