[Yum-devel] [PATCH] use yum tag when logging to syslog

Tim Lauridsen tim at rasmil.dk
Fri Dec 22 13:42:35 UTC 2006


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

Tim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum-devel/attachments/20061222/473a883b/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: yum-syslog-patch.txt
Url: http://lists.baseurl.org/pipermail/yum-devel/attachments/20061222/473a883b/attachment.txt 


More information about the Yum-devel mailing list