annotate lib/logsetup.py @ 449:ef7eba0551f2

collector partial py3+types update. WIP Ignore-this: 3fe8cc7b09bbfc8bec7f5d6a5e1630b
author drewp@bigasterisk.com
date Thu, 18 Apr 2019 22:00:06 -0700
parents 163cfa384372
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
1 # todo: graylog, twisted web route to some channel
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
2
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
3 import logging
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
4 logging.basicConfig(format="%(created)f %(asctime)s %(name)s %(levelname)s %(message)s")
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
5 logging.getLogger('restkit.client').setLevel(logging.WARN)
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
6 log = logging.getLogger()
26a6cf58743d entrancemusic improve logging
drewp@bigasterisk.com
parents:
diff changeset
7 log.setLevel(logging.INFO)
217
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
8
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
9 def enableTwistedLog():
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
10 from twisted.python import log as twlog
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
11 import sys
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
12 twlog.startLogging(sys.stdout)
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
13
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
14
163cfa384372 enableTwistedLog
drewp@bigasterisk.com
parents: 1
diff changeset
15