[Yum-devel] Logging (no excitement)

James Bowes jbowes at redhat.com
Wed May 31 18:10:26 UTC 2006


Tim Lauridsen wrote:
> I dont know if this patch is the right way to go, it breaks the logging 
> in the yum API, Programs using the API like yumex overloads the
> log, error, filelog methods in yumbase to redirect the log output fx. to 
> a TextView, other application build on the yum API. yum utils, pup, 
> pirut might be affected too.

It should be easy enough for yumex or other frontends to get ahold of 
the logging output by creating a new StreamHandler and registering it 
with the logging system to catch yum's output.

One of my goals for this was so that other programs using the yum API 
wouldn't have to inherit from YumBase and overload the log methods to 
grab the output. With python's logging module, yum can log where it 
wants to, yumex can display the logging info in a text widget, and Joe 
Developer's crazy plugin can send the output to his yum log aggregating 
Internet appliance. or something.

> A better way to implement this kind of logging is to build some kind of 
> wrapper there translates the log,erorlog,filelog into python logging. 
> Then the API will not be broken.

That might be doable, but it wouldn't really address any of the 
drawbacks in yum's current logging system.

> Tim
> Yumex Developer


More information about the Yum-devel mailing list