view lib/logsetup.py @ 1309:b54164bcded3

rm old code to read a shaft encoder on an rpi, and a simple thermostat service that switches a house heater on Ignore-this: b199393215c152f5daf5f0c781387d51 darcs-hash:3e25f2056470b710fb1cf5bfc34f585914469d56
author drewp <drewp@bigasterisk.com>
date Sun, 21 Apr 2019 03:18:45 -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)