view lib/logsetup.py @ 483:a8823c7aab58

door lock rules Ignore-this: 182c5bf72e51479c94f03e4bb8deeb2a
author drewp@bigasterisk.com
date Sun, 21 Apr 2019 00:04:32 -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)