Summary | Syslog is appending the conf['log']['ident'] value to the message log |
Queue | Horde Base |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | goncalo.queiros (at) portugalmail (dot) net |
Created | 10/20/2010 (5371 days ago) |
Due | |
Updated | 08/08/2011 (5079 days ago) |
Assigned | 11/25/2010 (5335 days ago) |
Resolved | 08/08/2011 (5079 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
Changelog (
Request #9322).2 files changed, 2 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/486b9e2d96278419aa48e6f469a195dd983bfd0e
Set ident option in base driver (
Request #9322).2 files changed, 3 insertions(+), 10 deletions(-)
http://git.horde.org/horde-git/-/commit/4e9e6b14fbe58b08e4f43b1603f8884abd85685d
We still want to use the configured handler, even if setting the ident
fails (
Request #9322).2 files changed, 8 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/94861a4107ac7e07f234aaed3e787f80b4be8c50
Make every log handler, handle the message ident on their own
Request: #9322Signed-off-by: Jan Schneider <jan@horde.org>
6 files changed, 28 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/687f7cc6314e9f3250629032e389ce39e47e7453
New Attachment: 0001-Make-every-log-handler-handle-the-message-ident-on-t[1].patch
call setOption() (and catch exceptions for BC reasons) where the
handler is instantiated. This way you don't need to change the
constructor signatures of the handlers. You only need to add the
'ident' option to all handlers' $_options array.
New Attachment: 0001-Make-every-log-handler-handle-the-message-ident-on-t.patch
the Core package. You need to pass any configuration settings that you
need into the class constructors.
I used the GLOBALS['conf'], because it was already used by the
framework, and i also didn't saw anything wrong with it, since making
a grep for 'GLOBALS['conf'] on the framework returns a lot of results.
Can you give me a suggestion of how are you solving this problem?
Thanks
Horde configuration.
New Attachment: 0001-Allow-every-log-handler-to-handle-the-log-ident-inst.patch
Now the ident append is done in Horde_Log_Handler_Base::appendIdent.
If a handler want's to change the behavior, it just needs to overwrite
this method (just like i did with syslog handler)
Probably don't have time tomorrow to look at it, but Monday will try
to have the patch ready
configuration as the the handlers sees fit. That means that the
syslog handler should not introduce a new ident configuration, but
use the existing one, right?
"new conf" way..I don't mind doing any way, just need to know ;)
State ⇒ Feedback
For one, don't use the global configuration in the library code, i.e.
in Horde_Log_Handler_Syslog.
Beside that, I thought the idea was to use the existing ident
configuration as the the handlers sees fit. That means that the syslog
handler should not introduce a new ident configuration, but use the
existing one, right?
New Attachment: 0001-Make-every-log-handler-handle-the-ident-conf-on-thei.patch
Make every handler handle the ident conf on their own
Syslog handler now has a new conf (syslog_ident), that is appended to
the begining of every logged message.
I believe the patch is not 100% correct, due to my lack of knowledge
of other log handlers (like db and firebug).
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Syslog is appending the conf['log']['ident'] value to the message log
Type ⇒ Bug
Queue ⇒ Horde Base
messages will be in the form of:
"identity: identity [app] message"
The identity is repeated, which seems excessive.
The problem i think, is on the Horde_Core_Log_Logger::log function,
that merges the original message with the conf['log']['ident'] and
then passes this new string as the message to syslog class (or
whatever log system Horde is using).
This works fine with files because they don't get the identity repeated...