Mercurial > code > home > repos > homeauto
view lib/standardservice/logsetup.py @ 573:0c7fa3bbbba7
turn up deferred lifecycle logging in -v mode
Ignore-this: f92c9cb3f0807279b6402b3177a5090b
author | drewp@bigasterisk.com |
---|---|
date | Mon, 06 May 2019 00:18:42 -0700 |
parents | af9a29a63a28 |
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)