view lib/logsetup.py @ 330:1ff1fbf6b183

move stategraph from magma Ignore-this: 608e916953280812145c6f9ffc5313db
author drewp@bigasterisk.com
date Sat, 17 Feb 2018 23:44:51 -0800
parents 163cfa384372
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)