view lib/logsetup.py @ 1152:6d2eba4d0dfd

pi read config over etcd Ignore-this: a7576b3077b88a9eb42f8fcb5d1c5dff darcs-hash:40abf69526415491376975ea9eb2abffcc9ac663
author drewp <drewp@bigasterisk.com>
date Sun, 15 Apr 2018 04:18:11 -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)