Mercurial > code > home > repos > homeauto
view lib/standardservice/logsetup.py @ 1492:7c7415cfbc02
iot2: WIP still. more messages schema
Ignore-this: ef94336852ff8885df861146fc1b01b
darcs-hash:f5e1ffe61ecff1a7430b58a7504e35dcc809b1f8
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Wed, 29 Jan 2020 01:03:40 -0800 |
parents | d3b8d9ffebca |
children |
line wrap: on
line source
# todo: graylog, twisted web route to some channel import logging from twisted.internet import defer 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) def verboseLogging(yes): if yes: enableTwistedLog() log.setLevel(logging.DEBUG) defer.setDebugging(True) else: log.setLevel(logging.WARN)