[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: pungi logger

On Tuesday 15 May 2007 14:20:29 Jesse Keating wrote:
> On Friday 04 May 2007 10:13:34 Joel Andres Granados wrote:
> > Referring to ticket #34 at
> > https://hosted.fedoraproject.org/projects/pungi/ticket/34 stating that
> > the logger needed a little work so that it didn't depend on the
> > gather.py (or at least thats what I understood :)  I propose either a
> > new file (pungiLog.py) located in the pypungi directory or a new
> > function in the "pungi" file that contains the logging stuff.  The log
> > services would be started somewhere before the line containing "#
> > Actually do work." of the "pungi" file.  The logging root would be
> > called "pungi" and would be called in each file that logging is needed
> > with the logging.getlogger("pungi") command.
> > If "quiet" is specified in the config file the logging will be turned
> > off.
> >
> > *Diff for the pungi file:*
> > 1. Initializes the logger by calling to the new file.
> > 2. specify quiet value.
> > 3.  logging function.
> > *
> > Diff for pungi.py file:
> > *1. use the correct logger.
> > *
> > Diff for gather.py file:*
> > change all the if statements for each logging call.
> >
> > Files attached...
> > Comments appreciated.
> Thanks for this.  I think this is the right direction.  However I'm
> reluctant to make such a change this late in Fedora 7 development.  I'll
> want to look at this once I start doing Fedora 8 changes.

I just looked at this again and I don't think it'll quite work.  The thing is 
I want logging to work if somebody just imported pypungi and started using 
commands.  Maybe that's not possible, maybe it is.  Something to look into.  
I think I can have a pypungi.logger module/class that has some reasonable 
defaults that can be overridden if the config file is used, or if 
say /usr/bin/pungi is envoked, but would work otherwise.

Jesse Keating
Release Engineer: Fedora

Attachment: pgp2f2iI3N3D6.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]