Merge lp:~jameinel/bzr/2.0.4-trace-failure into lp:bzr/2.0
Proposed by
John A Meinel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrew Bennetts | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~jameinel/bzr/2.0.4-trace-failure | ||||
Merge into: | lp:bzr/2.0 | ||||
Diff against target: |
67 lines (+27/-1) 3 files modified
NEWS (+6/-0) bzrlib/tests/test_trace.py (+15/-0) bzrlib/trace.py (+6/-1) |
||||
To merge this branch: | bzr merge lp:~jameinel/bzr/2.0.4-trace-failure | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Bennetts | Approve | ||
Review via email: mp+16917@code.launchpad.net |
To post a comment you must log in.
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.)