#2343 new defect

remove all direct logging to twisted.python.log/err — at Initial Version

Reported by: daira Owned by:
Priority: normal Milestone: undecided
Component: code Version: 1.10.0
Keywords: error logging twisted Cc:
Launchpad Bug:

Description

We should never be logging directly to the Twisted log, because that is confusing and misleading, especially when log.err is used (e.g. see #812). We should be logging via allmydata.util.log.msg instead.

$ grep -Rn --include='*.py' 'from twisted.python import .*log' src
src/allmydata/node.py:4:from twisted.python import log as twlog
src/allmydata/windows/tahoesvc.py:152:            from twisted.python import log, logfile
src/allmydata/util/iputil.py:10:from twisted.python import log
src/allmydata/util/fileutil.py:7:from twisted.python import log
src/allmydata/util/pipeline.py:4:from twisted.python import log
src/allmydata/util/log.py:4:from twisted.python import log as tw_log
src/allmydata/manhole.py:6:from twisted.python import log
src/allmydata/blacklist.py:6:from twisted.python import log as twisted_log
src/allmydata/web/common.py:4:from twisted.python import log
src/allmydata/storage/expirer.py:6:from twisted.python import log as twlog
src/allmydata/test/test_util.py:9:from twisted.python import log
src/allmydata/test/test_web.py:10:from twisted.python import failure, log
src/allmydata/test/test_introducer.py:8:from twisted.python import log
src/allmydata/test/check_memory.py:13:from twisted.python import log
src/allmydata/test/test_codec.py:4:from twisted.python import log
src/allmydata/test/check_speed.py:3:from twisted.python import log
src/allmydata/test/test_node.py:5:from twisted.python import log
src/allmydata/control.py:12:from twisted.python import log
$ grep -Rn --include='*.py' 'twisted.python.log' src
src/allmydata/test/test_client.py:56:    @mock.patch('twisted.python.log.msg')

Change History (0)

Note: See TracTickets for help on using tickets.