view lib/logsetup.py @ 1140:f349fe25789c

rgb strip animation support in arduinoNode Ignore-this: 5f50c7b54ce1588243735c43d2cbea0f darcs-hash:0e2e1e2156b181c83d6e4f2f85afc849dc07fec0
author drewp <drewp@bigasterisk.com>
date Sat, 03 Mar 2018 17:55:37 -0800
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)