If my understanding of the PR is correct, I've implemented similar
output using PatternLayout with a pattern along these lines, though
it's not very pretty to read:

{"timestamp":"%d{ISO8601}", "level":"%p",
"logger":"%encode{%c}{JSON}", "thread":"%encode{%t}{JSON}", "message":
"%encode{%m}{JSON}", "trace": "%encode{%xEx}{JSON}"}%n

I wonder if this is sufficient, or if we can implement pattern
converters to fill the gaps?


On Mon, Apr 9, 2018 at 7:30 AM, Matt Sicker <boa...@gmail.com> wrote:
> We use Jira to track features, bugs, everything really. Choose "New
> Feature" as the type when reporting.
> As for the PR being useful, I haven't looked super closely, but I could see
> this being potentially useful in a logging flow where a developer batches
> up multiple log messages to send to a custom HTTP endpoint or similar. It
> could allow for custom JSON payloads in this example (e.g., bulk index
> request in Elasticsearch to save multiple records at once).
> On 9 April 2018 at 01:49, David Knapp <david.c.kn...@gmail.com> wrote:
>> I just opened up PR 163 https://github.com/apache/logging-log4j2/pull/163
>> It adds a new layout that's designed for key/value usage. I looked at the
>> contributer guidelines, and they say to open a JIRA ticket, but it sort of
>> implies that that's for bugs, not new features. Do you guys need a JIRA
>> ticket for new features too?
>> On that note, is this something that you'd even like in the main codebase?
>> Or something I should just publish myself as an external thing.
>> Thanks
>> -David
> --
> Matt Sicker <boa...@gmail.com>

Reply via email to