Closed (fixed)
Project:
JSONlog
Version:
7.x-2.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Mar 2015 at 12:57 UTC
Updated:
24 Jul 2015 at 13:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jacobfriis commented@mkozhuharov
Thx for your info and suggestion.
Replacement of variables in the message should rather be performed on demand by the log client.
Because replacement introduces an extra overhead. And that overhead is mostly redundant, because in the practical world nobody reads every single log entry.
But I'll check with the Elasticsearch guys at my workplace how they handle variables.
And an option for JSONlog to do the replacement sounds like a good idea.
Comment #2
jacobfriis commented@mkozhuharov
I believe you're right ;-) It doesn't make practical sense that ElasticSearch should replace variables into messages.
However, I'm not fond of drupal_alter'ing because of the overhead involved in hook invokation.
So with ...-2.patch JSONlog now does the job. And the feature is not a conf option, but mandatory - the module has enough options as it is.
The replacement is performed exactly the same way as format_string() does it - except JSONlog doesn't wrap replacements in placeholder HTML tags (because HTML is not really desirable in this context).
Comment #3
jacobfriis commentedThis patch is not compatible with: #2427723...-4.
Combined patch: jsonlog-combine-issues-2427723-and-2448753.patch
Comment #4
mkozhuharov commented@jacobfriis
Thanks for the patch :)
Comment #5
jacobfriis commentedOops, variable replacement should take place _before_ escaping.
Comment #7
jacobfriis commentedFixed in JSONlog 7.x-2.1.