[Yum-devel] [PATCH] use yum tag when logging to syslog
seth vidal
skvidal at linux.duke.edu
Sat Dec 23 08:49:57 UTC 2006
On Fri, 2006-12-22 at 14:42 +0100, Tim Lauridsen wrote:
> seth vidal wrote:
> > On Tue, 2006-12-19 at 11:24 -0500, Jeremy Katz wrote:
> >
> > > On Mon, 2006-12-18 at 21:29 +0100, Terje Rosten wrote:
> > >
> > > > + app = os.path.basename(sys.argv[0])
> > > > + if app == 'yum':
> > > > + app = 'yum-cli'
> > > >
> > > Personally, I'd prefer if this were done by an explicit call from the
> > > app and we just leave out the app if it's not specified.
> > >
> > >
> >
> > +1
> >
> > -sv
> >
> >
> I have worked a little with Terje's patch and modified it so the
> application can be set by a function call.
>
> I have add the following code in yumex to test it.
>
> # Try to set the Logging application shown in syslog
> try:
> yum.logginglevels.setLoggingApp('yumex')
> except:
> pass
>
> if i install something in yumex, it looks like this.
> Dec 22 14:33:41 localhost yum(yumex): Updated: mplayerplug-in.i386
> 3.35-1.lvn6
>
That looks like a winner.
I'm sure the logwatch people will hate us, but oh well. :)
thanks,
-sv
More information about the Yum-devel
mailing list