view lib/logsetup.py @ 1044:724cb8ea49b4

case check error Ignore-this: 7d175ad43bbf538c1ba32e6ee0b64e2d darcs-hash:bf8630b887e1e2bc4488aa2708c1dc0a3ada04e5
author drewp <drewp@bigasterisk.com>
date Mon, 01 Feb 2016 03:09:08 -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)