Backtraces

Martin Pool mbp at sourcefrog.net
Fri Nov 18 00:53:30 GMT 2005


On 17 Nov 2005, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> It's nice to avoid printing bracktraces for exceptions most of the time,
> but now I don't know how to get them at all, and it's very frustrating.
> 
> I'm running with BZR_DEBUG=1, and I'm not even getting the backtrace in
> the log.  How do I get it?

I'll check it out.  The behavior I'd like to have is this:

 - All debug messages and tracebacks always go to .bzr.log; so 
   there is no BZR_DEBUG.  That was supposed to be the point of the log:
   that you always have what you need for postmortem debugging.
   This may mean stubbing out some debug calls that are in particularly
   hot functions but that's probably worthwhile anyhow.

 - stderr will get info messages by default; with --quiet will get
   only warning and above; perhaps with --debug will put out debug 
   messages too 

 - stderr always gets one-line error messages.  bzr errors are printed 
   through their str method; other exceptions need to be shown with
   their class and also with the line number

I'm inclined to just write to the files directly, and only go through
python logging if someone specifically wants it (e.g. for embedding into
a larger application.)

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051118/99e5f702/attachment.pgp 


More information about the bazaar mailing list