view lib/logsetup.py @ 1136:1e43ec4a5f23

build and import updates for rdfdb, etc Ignore-this: 233cb2b31f03be51695f0fff40eecca7 darcs-hash:92c1c526292f9013ad41d2e3b6d11add8fff02ae
author drewp <drewp@bigasterisk.com>
date Mon, 19 Feb 2018 04:21:28 -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)