[Yum-devel] logging

Michael Stenner mstenner at linux.duke.edu
Sun Mar 7 17:17:43 UTC 2004


On Sun, Mar 07, 2004 at 10:41:44AM -0500, Ryan Tomayko wrote:
> On Sat, 2004-03-06 at 23:50, seth vidal wrote:
> > suggestions on how to do it and keep yum -d # -e # relatively sane?
> 
> That's what I was wondering to. The python logging interface is
> name/level based instead of numerical (although it is numerical under
> the hood). I don't believe there are enough names to match the numbers
> in yum. Here's how the numbers would break down if you ran through and
> replaced log(n calls with a corresponding logging method call without
> thinking about it:
> 
> logging      yum
> ------------ ------
> debug        5
> info         4
> warning      3
> error        2
> critical     1

It's possible to subclass the default Logger class such that it has
more levels (possibly with completely different names) and convenience
methods.  Then, you simply tell the module to use that class instead.
Therefore, I think this is pretty much a non-issue.  Out of the box,
it doesn't do what we want, but it's a pretty trivial subclass to do it.

> Not so great. Plus there's the concept of a debug and error logger in
> yum and those seem to be contained in a single logger here.

I think it's possible to have multiple loggers each with their own
level that may both report to the same place.  Therefore, I think this
can be handled pretty easily, too.

					-Michael
-- 
  Michael D. Stenner                            mstenner at ece.arizona.edu
  ECE Department, the University of Arizona                 520-626-1619
  1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G



More information about the Yum-devel mailing list