view lib/logsetup.py @ 1081:0fa2e07691f7

quoting Ignore-this: 6117b9f992a8361ba663590b13c9c69b darcs-hash:9d7633b7cf25a65a7040b8f6fc918d731ce7f85c
author drewp <drewp@bigasterisk.com>
date Fri, 06 May 2016 17:29:32 -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)