Code review comment for lp:~mbp/bzr/remove-logging

Revision history for this message
Martin Pool (mbp) wrote :

This removes bzr's use of the Python logging module. Now all output either goes through bzrlib.trace to the log file (for developer-oriented information) or through Command.outf or UIFactory to the user (for regular interaction.)

This may slightly improve startup time (or enable improving it); more importantly it reduces the proliferation of different methods so that they're easier to debug and test. (Exhibit A, the diff to test_plugins, removing about 20 lines of overhead.)

This deprecates some APIs, but shouldn't break callers unless they're relying on bzrlib writing to logging. (Launchpad might?) But since we never did that very consistently, they're probably better off changing.

* Add some developer documentation about how things are meant to work - previously discussed on the list on "[rfc] developer documentation on user interaction"

* As a side-effect this causes more notice-type messages to go to stderr.

* Remove some unused test support related to logging.

* There were multiple names for equivalent methods in trace.py - some are now deprecated.

* trace.py sends user-oriented messages to the UIFactory.

Also some drive-by fixes while testing this:

* Delete test that was redundant with UpgradeRecommendedTests.

* Update some old tests from before tags were supported by default.

« Back to merge proposal