Mercurial > code > home > repos > homeauto
view lib/standardservice/logsetup.py @ 746:099b7e7aad44
page styles
Ignore-this: 29c0f7dcd203e73e7569c796686f8802
author | drewp@bigasterisk.com |
---|---|
date | Thu, 13 Feb 2020 10:19:46 -0800 |
parents | 0c7fa3bbbba7 |
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)