annotate lib/logsetup.py @ 1154:5da3a85b59e4
more robust about not accumulating old stmts
Ignore-this: ee8618c8341d028fd7bd3596cd16a43d
darcs-hash:447cf599c2a1633481bc68fc3bc2fa5b8352fbf5
author |
drewp <drewp@bigasterisk.com> |
date |
Mon, 16 Apr 2018 22:16:15 -0700 |
parents |
e379b1b4fe8b |
children |
|
rev |
line source |
806
|
1 # todo: graylog, twisted web route to some channel
|
|
2
|
|
3 import logging
|
|
4 logging.basicConfig(format="%(created)f %(asctime)s %(name)s %(levelname)s %(message)s")
|
|
5 logging.getLogger('restkit.client').setLevel(logging.WARN)
|
|
6 log = logging.getLogger()
|
|
7 log.setLevel(logging.INFO)
|
1022
|
8
|
|
9 def enableTwistedLog():
|
|
10 from twisted.python import log as twlog
|
|
11 import sys
|
|
12 twlog.startLogging(sys.stdout)
|
|
13
|
|
14
|
|
15
|