view lib/logsetup.py @ 419:fdbdecdecd0b

use rel path for config Ignore-this: 5f2c4d0f4004f4472f89b6c9478b846d
author drewp@bigasterisk.com
date Sat, 30 Mar 2019 16:57:08 -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)