6.0.0-git
2019-04-23

[#9322] Syslog is appending the conf['log']['ident'] value to the message log
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 2010-10-20 (3107 days ago)
Due
Updated 2011-08-08 (2815 days ago)
Assigned 2010-11-25 (3071 days ago)
Resolved 2011-08-08 (2815 days ago)
Milestone
Patch No

History
2011-08-08 17:02:40 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
2011-08-08 17:02:16 Jan Schneider Deleted Original Message
 
2011-08-08 17:02:06 Git Commit Comment #20 Reply to this comment
Changes have been made in Git for this ticket:

Changelog (Request #9322).

  2 files changed, 2 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/486b9e2d96278419aa48e6f469a195dd983bfd0e
2011-08-08 17:02:05 Jan Schneider Deleted Original Message
 
2011-08-08 17:02:02 Git Commit Comment #19 Reply to this comment
Changes have been made in Git for this ticket:

Set ident option in base driver (Request #9322).

  2 files changed, 3 insertions(+), 10 deletions(-)
http://git.horde.org/horde-git/-/commit/4e9e6b14fbe58b08e4f43b1603f8884abd85685d
2011-08-08 17:01:59 Git Commit Comment #18 Reply to this comment
Changes have been made in Git for this ticket:

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
2011-08-08 17:01:55 Git Commit Comment #17 Reply to this comment
Changes have been made in Git for this ticket:

Make every log handler, handle the message ident on their own
Request: #9322
Signed-off-by: Jan Schneider <jan@horde.org>

  6 files changed, 28 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/687f7cc6314e9f3250629032e389ce39e47e7453
2011-08-08 17:01:54 Jan Schneider Deleted Original Message
 
2011-08-02 10:06:52 goncalo (dot) queiros (at) portugalmail (dot) net Comment #16
New Attachment: 0001-Make-every-log-handler-handle-the-message-ident-on-t[1].patch Download
Reply to this comment
Ping?
Sorry..here it goes
2011-07-30 12:12:29 Jan Schneider Comment #15 Reply to this comment
Ping?
2011-06-08 13:29:25 Jan Schneider Comment #14 Reply to this comment
Looks much better now. I can even be improved though, if you simply 
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.
2011-05-23 15:53:26 goncalo (dot) queiros (at) portugalmail (dot) net Comment #13
New Attachment: 0001-Make-every-log-handler-handle-the-message-ident-on-t.patch
Reply to this comment
Is this the intended fix?
2011-05-23 11:51:31 Jan Schneider Comment #12 Reply to this comment
The only place where you could see $conf access in the framework is in 
the Core package. You need to pass any configuration settings that you 
need into the class constructors.
2011-05-23 11:03:49 goncalo (dot) queiros (at) portugalmail (dot) net Comment #11 Reply to this comment
Hi there.

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
2011-05-18 16:18:01 Jan Schneider Comment #10 Reply to this comment
Ping?
2011-04-18 11:33:56 Jan Schneider Comment #9 Reply to this comment
This is not a valid solution either, because framework code accesses 
Horde configuration.
2011-04-08 10:49:41 goncalo (dot) queiros (at) portugalmail (dot) net Comment #8
New Attachment: 0001-Allow-every-log-handler-to-handle-the-log-ident-inst.patch
Reply to this comment
Sorry for the delay.

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)
2011-04-01 00:07:18 goncalo (dot) queiros (at) portugalmail (dot) net Comment #7 Reply to this comment
Hey Chuck sorry for the delay, missed your email somehow.
Probably don't have time tomorrow to look at it, but Monday will try 
to have the patch ready
2011-03-31 23:44:25 Jan Schneider Comment #6 Reply to this comment
Ping?
2011-03-19 02:16:16 Chuck Hagenbuch Comment #5 Reply to this comment
I agree with Jan. Can you update the patch?
2010-11-28 20:13:40 goncalo (dot) queiros (at) portugalmail (dot) net Comment #4 Reply to this comment
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?
I proposed that on dev, but then i think other members preferred the 
"new conf" way..I don't mind doing any way, just need to know ;)
2010-11-25 17:53:57 Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
That doesn't look quite right.
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?
2010-11-10 15:21:25 goncalo (dot) queiros (at) portugalmail (dot) net Comment #2
New Attachment: 0001-Make-every-log-handler-handle-the-ident-conf-on-thei.patch
Reply to this comment
Tried to stick to what was said on Dev.
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).
2010-10-20 10:47:58 goncalo (dot) queiros (at) portugalmail (dot) net Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Syslog is appending the conf['log']['ident'] value to the message log
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
I don't know if this is the intended behaviour, but now all Syslog 
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...

Saved Queries