[MERGE] Updates to the 'startup' logging

John Arbash Meinel john at arbash-meinel.com
Thu Oct 30 00:58:55 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Since Andrew liked my earlier patch, I went ahead and did a quick
cleanup of some of the ever-present logging.

Specifically:

1) As part of setting up logging, we call
osutils.get_terminal_encoding(), which then logs what encoding we will
use. It will log it again when we call it to setup self._outf(). So
instead, I switched and suppressed the first one.

2) I added the code to log the timestamp of when we open the log file.

3) I fixed the plugin importing code so that it knows to ignore the
__init__.py files it may find (it finds __init__.py and __init__.pyc
most likely.)

For comparison, running a simple "bzr st" used to give:

0.063  encoding stdout as sys.stdout encoding 'cp437'
0.063  bzr arguments: [u'st']
0.063  looking for plugins in C:\Users\jameinel\dev\bzr\plugins
0.234  looking for plugins in
C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\plugins
0.234  Plugin name __init__ already loaded
0.234  Plugin name __init__ already loaded
0.250  encoding stdout as sys.stdout encoding 'cp437'
0.328  opening working tree 'C:/Users/jameinel/dev/bzr/jam-integration'
0.328  check paths: None
0.406  return code 0


And now it gives:

2008-10-29 19:56:24
0.078  bzr arguments: [u'st']
0.078  looking for plugins in C:\Users\jameinel\dev\bzr\plugins
0.234  looking for plugins in
C:\Users\jameinel\dev\bzr\jam-integration\bzrlib\plugins
0.249  encoding stdout as sys.stdout encoding 'cp437'
0.312  opening working tree 'C:/Users/jameinel/dev/bzr/jam-integration'
0.327  check paths: None
0.390  return code 0

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkJBs4ACgkQJdeBCYSNAAPIXgCgz1i2u0MIlfofV80KDwGnREjl
hycAn0x1eqpXqSXZ5n4imVJ7JPY3qkn6
=RZX/
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: trace_updates.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20081029/9646d74b/attachment.diff 


More information about the bazaar mailing list