[dev] Syslog duplicating identity
Gonçalo Queirós
goncalo.queiros at portugalmail.net
Tue Nov 2 19:56:11 UTC 2010
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.
When you say "Seems to me like configuring it specifically on the syslog
logger makes sense" where you refering to option 1 or 2?
Thanks
--
Gonçalo Queirós
Eng. Software
*m.* 913918777
*Portugalmail* | plataformas de inovação
*w.* http://www.portugalmail.net
More information about the dev
mailing list