Better error message on readonly log files

Bug #201580 reported by Marek Kubica
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

I have a setup where multiple users work on the same checkout. As I migrated the whole thing to another host, it turned out, that some of the users were getting strange log messages whereas I had no problems at all. It turned out that their ~/.bzr.log was read-only and therefor the logger failed to write there and chose to write to the console. This was in no way intended and abentely helped me to solve this problem - setting the proper richts to ~/.bzr.log. Nonetheless, it would be good if the logger did say something about that failure before falling back to console output, so it would be easier to figure out what's wrong.

user@chronon:~/current$ bzr status
No handlers could be found for logger "bzr"
modified:
  homepage/templates/homepage/index.html
user@chronon:~/current$ bzr commit -m "minor optical change on the flash intro"
No handlers could be found for logger "bzr"
[ 6272] 2008-03-11 17:25:39.475 INFO: Committing
to: /home/django/repositories/production/
Committing to: /home/django/repositories/production/
[ 6272] 2008-03-11 17:25:39.544 INFO: modified
homepage/templates/homepage/index.html
modified pointtec/homepage/templates/homepage/index.html
[ 6272] 2008-03-11 17:25:39.757 INFO: Committed revision 478.
Committed revision 478.

I am using the current bzr 1.2 but I believe that this problem has been there for much longer.

Revision history for this message
James Westby (james-w) wrote :

Hi,

It is possible to check when this happens by checking

  logger.manager.emittedNoHandlerWarning

after a log operation (warn, debug, etc.)

This may be a bit of a broad check though.

Writing the log to stdout in this case is not nice, but
that seems to be logger's behaviour.

Thanks,

James

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.