view lib/logsetup.py @ 400:1b303e7542a3

start the next python rewrite of rfid pm_532 reader. Nim didn' Ignore-this: b6a98b3f0f1c4147bedcc5d2bcfec226 t go well with asynchttpserer adn hreaind
author drewp@bigasterisk.com
date Wed, 27 Feb 2019 10:23:36 -0800
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)