Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
Description
In order to help output parsers, it is sometimes useful to prefix log output with the key of each item.
Example 1:
%X{user}
would be easier to parse if it were written as
user=%X{user}
Example 2:
%X{user} %{sessionId} %level %logger %msg
would be easier to parse if written as
user=%X{user} sessionId=%{sessionId} level=%level logger=%logger msg=%msg
The prefix composite converter does the prefixing for you. Thus, the following two patterns generate equivalent output
%prefix(%X{user} %{sessionId} %level %logger %msg)
and
user=%X{user} sessionId=%{sessionId} level=%level logger=$logger msg=%msg}