[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9199 [BridgeDB]: Rethink the logging of BridgeDB
#9199: Rethink the logging of BridgeDB
--------------------------+----------------------------------------------
Reporter: asn | Owner: isis
Type: task | Status: needs_review
Priority: normal | Milestone:
Component: BridgeDB | Version:
Resolution: | Keywords: bridgedb-logging, bridgedb-0.1.7
Actual Points: | Parent ID:
Points: |
--------------------------+----------------------------------------------
Changes (by isis):
* keywords: bridgedb-logging => bridgedb-logging, bridgedb-0.1.7
Comment:
All of the Python loggers are messed up and incompatible with each other
without resorting to gross hacks and jumping through hoops. Unless we want
to switch to a "real" logger which supports asynchronous file IO, i.e.
[http://foolscap.lothar.com/docs/logging.html Foolscap's logging module]
or [http://i.wearpants.org/blog/meet-twiggy/ Twiggy], working with
`twisted.python.log` is hell and the stdlib `logging` (which we currently
use) is possibly worse. This would require major overhauls, and it's not
the highest priority thing to deal with right now in BridgeDB.
I pulled the automatic log filters from my old branches, and a pretty
formatter which helps with debugging by optionally showing function call
traces and thread IDs. The automatic filters, if enabled with the
`SAFELOGGING` config option, will automagically scrub IPv4/6 addresses and
email addresses from the logs.
This, as well as the unittests for the changes (which fix #9875), are in
my
[https://gitweb.torproject.org/user/isis/bridgedb.git/shortlog/refs/heads/fix/9199-safelogging
fix/9199-safelogging branch]. All tests pass, and coverage for the changes
is %100. Because it doesn't change any functionality (other than removing
the need to manually call `bridgedb.Util.logSafely()` for every variable
which might contain sensitive data), I'm going to merge this into
`bridgedb-0.1.7`.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9199#comment:30>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs