[dev] Syslog duplicating identity
Gunnar Wrobel
p at rdus.de
Tue Nov 2 20:44:33 UTC 2010
Quoting Gonçalo Queirós <goncalo.queiros at portugalmail.net>:
>
> On 10/29/2010 09:40 PM, Chuck Hagenbuch wrote:
>> Quoting Gonçalo Queirós <goncalo.queiros at portugalmail.net>:
>>
>>> Hi there list.
>>> Been trying to solve the bug i submitted
>>> (http://bugs.horde.org/ticket/9322, which has a terrible title btw), and
>>> from what i can see, there seems to be two options to solve this issue:
>>>
>>> 1 - Create a new conf (ex $conf['log']['syslog_ident']) to hold the
>>> identity value to php's "openlog" function
>>>
>>> 2 - Refactor the code, and instead of having Horde_Core_Log_Logger
>>> prepend the ident to the message and pass it to its parent
>>> (Horde_Log_Logger) have Horde_Log_Logger asking every handler if it
>>> knows how to handle the ident conf. If the handler doesn't know, pass it
>>> the message prepended with the ident, if the handler knows how to handle
>>> the ident conf, just pass it the message, and change the handler so it
>>> knows what to do.
>>>
>>> I can patch any of these solutions, if you find any of them correct. If
>>> not, just let me know, and i can patch it too (i hope).
>>
>> What does "ident" mean in the context of anything other than syslog?
>> Seems to me like configuring it specifically on the syslog logger
>> makes sense, but if someone has a good answer to my question then I
>> could be convinced...
>>
>> -chuck
>>
>
> The ident outside the syslog context is used has the beginning of the
> message, to clearly identify what horde instance wrote to a file (ex).
> I think that if every Horde instance writes to it's own file, than
> there's no need for this ident, but if they write to same file, the
> ident is actually necessary to identify which Horde instance wrote that
> lines.
Makes sense.
> When you say "Seems to me like configuring it specifically on the syslog
> logger makes sense" where you refering to option 1 or 2?
Rather than having Horde_Log_Logger asking the different handlers
about their capabilites I think the handlers should be required to
handle the configuration value correctly. If we decide the "ident"
value is required then each handler should automatically handle it.
Most might just prepend it to the strings they log. The SQL based
handler would be required to log the ident value in the DB.
Cheers,
Gunnar
> Thanks
> --
> Gonçalo Queirós
> Eng. Software
> *m.* 913918777
>
> *Portugalmail* | plataformas de inovação
> *w.* http://www.portugalmail.net
>
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
More information about the dev
mailing list