view lib/logsetup.py @ 1073:054fccde9a49

'seesRecently30' in arduinoNode Ignore-this: f89899de0374c9f2b2606d331213465 darcs-hash:1215e55dde94e1afa6c51355897ba57f499a7966
author drewp <drewp@bigasterisk.com>
date Thu, 14 Apr 2016 00:14:55 -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)