[Yum-devel] RFC: logging/output

seth vidal skvidal at fedoraproject.org
Sat Mar 8 07:46:15 UTC 2008


On Sat, 2008-03-08 at 02:37 -0500, James Antill wrote:
> 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:

The patch looks pretty good. From what I played with it appears to:

1. not break the api.
2. not break filelogging


which is nice.

others?

-sv





More information about the Yum-devel mailing list