view lib/logsetup.py @ 382:61f1c529a9b7

etcd port change; pigpio download link change Ignore-this: cf0ce00b51c41c7d897bf5dbefab7480
author drewp@bigasterisk.com
date Fri, 28 Dec 2018 01:56:52 -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)