Code review comment for lp:~jameinel/bzr/2.0.4-trace-failure

Revision history for this message
John A Meinel (jameinel) wrote :

This fixes a fairly long-standing bug. If we failed to open ~/.bzr.log on the server, you end up getting the cryptic:
 No handlers could be found for logger "bzr"

This is because _open_bzr_log was trying to use the logging module to report the failure, but by that point in time we are *setting up* logging.

So I changed it to just report to stderr directly, which makes a lot more sense. It also means you'll get the path of the file that cannot be opened, which should make it clearer that it is happening server side, and not locally. (It won't always be 100% clear, but adding socket.gethostname() to that error message seemed a bit overkill.)

« Back to merge proposal