Mercurial > code > home > repos > homeauto
view lib/standardservice/logsetup.py @ 1332:9d4684867908
typo from addition of verboseLogging
Ignore-this: 76d72724b9a8bb7375f41a616ff84f0d
darcs-hash:4d9d667cee0da1d5e324af92cf07a166e8266fa5
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Tue, 23 Apr 2019 02:17:35 -0700 |
parents | 1934c050f8cc |
children | d3b8d9ffebca |
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) def verboseLogging(yes): if yes: enableTwistedLog() log.setLevel(logging.DEBUG) else: log.setLevel(logging.WARN)