pungi logger

Joel Andres Granados jgranado at redhat.com
Tue Jun 12 12:25:27 UTC 2007


> 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.
>
>   
> ------------------------------------------------------------------------
>
> --
> Fedora-buildsys-list mailing list
> Fedora-buildsys-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
This one can also be considered...
This solution activates logging as soon as the pypungi module is 
imported and puts it in the __builtin__ namespace as "Plog" (I called it 
"Plog" instead of "log" to give it a 'pungi' feel :).  This allows the 
user to use "Plog" from that poing on without having to do anything 
else.   The behavior of the "Plog" can be changed by calling on the 
pypungi.pungiLogO object and specifying the values that need to be 
changed.   I did a small test run and everything seems OK.
Jesse: I think this is close to what you mentioned on the previous mail 
and can be considered for inclusion.
The diff is attached.

-- 
Joel Andres Granados

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20070612/174bea23/attachment.ksh>


More information about the Fedora-buildsys-list mailing list