view lib/logsetup.py @ 1084:3a9f20f881d1

immediate mode needs a PUT request Ignore-this: 48c3b5d2c25440a43000b53079d0bd68 darcs-hash:c3756f6387c72f4e3eb0615104fca885560e4d16
author drewp <drewp@bigasterisk.com>
date Fri, 06 May 2016 17:32:18 -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)