view lib/logsetup.py @ 1070:1630e50d9842

sourceSubstr feature, untested Ignore-this: a7e5e11bef7fceffc2d2687ce9edcf6e darcs-hash:7d673210347008767dd40c7b48be32cf03e84372
author drewp <drewp@bigasterisk.com>
date Thu, 14 Apr 2016 00:11:12 -0700
parents e379b1b4fe8b
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)