view lib/logsetup.py @ 1024:fcd5ef7439ad

restart_all Ignore-this: 90de4d37694b06f1927a09946435f76 darcs-hash:fb132d4e981299f2cf6c2619f3047871ff5a2283
author drewp <drewp@bigasterisk.com>
date Sun, 03 Jan 2016 02:32:33 -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)