[Yum-devel] RFC: logging/output

James Antill james.antill at redhat.com
Sat Mar 8 07:37:38 UTC 2008


 So first off I'll try and list the problems with the current approach
to logging/output:

1. Function names are way to long, Eg.
self.verbose_logger.log(logginglevels.INFO_2, msg)

2. We have 20 distinct levels/interfaces right now ... not including
"print".

3. We don't cover the common cases well, for instance I think these
would be considered the common things you'd want:

i. quiet
ii. normal
iii. verbose
iv. debug (more in levels, sections or whatever).

...now IMO #iii is the biggest problem due to a bunch of debugging data
mixed in so isn't that usable/used.

4. Almost everything goes off of
YumBase.logger/YumBase.verbose_logger ... except some parts of the code
which don't have access to a YumBase object.

5. Also kind of related is that we don't have much in the way of good
output data utilities, for instance section headers.


...so the only thing I have for you to look at "solves" #1 and #4 (just
used in __init__ atm).
 Feel free to comment on anything. Patch at:

http://people.redhat.com/jantill/yum/patches/logging-2008-03-07.patch


-- 
James Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logging-2008-03-07.patch
Type: text/x-patch
Size: 30807 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080308/a776c6e7/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080308/a776c6e7/attachment.pgp 


More information about the Yum-devel mailing list