view lib/logsetup.py @ 1143:d1bc88f67969

RgbPixelsAnimation and docker build updates Ignore-this: c79e4a64bb5ad8683aa837839e79785b darcs-hash:bcc0201b2aaf3a1f1f689a6437eef8298970c58a
author drewp <drewp@bigasterisk.com>
date Sat, 03 Mar 2018 18:09:34 -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)