Mercurial > code > home > repos > homeauto
view lib/standardservice/logsetup.py @ 1344:4d3b31903c04
switch to setuptools and 'install_requires'
Ignore-this: ffb0aa596145b0ab6ce9983b399ef58b
darcs-hash:50e2ae0c03d3d1dfaadd112aa5d23171d6b69f7a
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Thu, 25 Apr 2019 22:59:43 -0700 |
parents | 9d4684867908 |
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)