view lib/logsetup.py @ 449:ef7eba0551f2

collector partial py3+types update. WIP Ignore-this: 3fe8cc7b09bbfc8bec7f5d6a5e1630b
author drewp@bigasterisk.com
date Thu, 18 Apr 2019 22:00:06 -0700
parents 163cfa384372
children
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)