view lib/logsetup.py @ 1052:2434e88d8bb0

add bed buttons Ignore-this: 912a92f7a8e173fe64aa4c1df9ef7dba darcs-hash:2e4031a9cacedb28f57c36708d69d6ec3610ef9d
author drewp <drewp@bigasterisk.com>
date Mon, 08 Feb 2016 23:48:29 -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)