[logback-dev] [JIRA] (LOGBACK-1415) {{prefix}} composite converter
QOS.CH (JIRA)
noreply-jira at qos.ch
Tue Aug 14 08:49:00 CEST 2018
Ceki Gülcü created LOGBACK-1415:
-----------------------------------
Summary: {{prefix}} composite converter
Key: LOGBACK-1415
URL: https://jira.qos.ch/browse/LOGBACK-1415
Project: logback
Issue Type: Improvement
Reporter: Ceki Gülcü
Assignee: Logback dev list
In order to help output parsers, it is sometimes useful to prefix log output with the key of each item.
*Example 1:*
{code}%X{user} {code}
would be easier to parse if it were written as
{code}%X{user} {code}
*Example 2:*
{code}%X{user} %{sessionId} %level %logger %msg{code}
would be easier to parse if written as
{code}user=%X{user} sessionId=%{sessionId} level=%level logger=$logger msg=%msg}{code}
The {{prefix}} composite converter automates the process. Thus, the following patterns generate equivalent output
{code}%prefix(%X{user} %{sessionId} %level %logger %msg){code}
and
{code}user=%X{user} sessionId=%{sessionId} level=%level logger=$logger msg=%msg}{code}
{code}user=%X{user} sessionId=%{sessionId} level=%level logger=$logger msg=%msg}{code}
--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
More information about the logback-dev
mailing list