view lib/logsetup.py @ 1194:ee9cbe5817a4

rfid reader service Ignore-this: 26df9a4be891c26722311cf89d1d7cf7 darcs-hash:80ff40afce46a1429309421b1db52aefd5b675a8
author drewp <drewp@bigasterisk.com>
date Thu, 03 Jan 2019 21:52:27 -0800
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)