view lib/logsetup.py @ 1214:c1792115b1d3

new 'store' service for user inputs Ignore-this: 7b14beca506dd7f1e38b5214aae1833a darcs-hash:9a1fcc5c46b304442940cfd956bf8ac4e5f6007b
author drewp <drewp@bigasterisk.com>
date Sat, 16 Mar 2019 18:22:57 -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)