logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1299) Add pattern converter for thread id and priority in PatternLayout
Date Wed, 02 Mar 2016 01:01:22 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15174742#comment-15174742
] 

Gary Gregory commented on LOG4J2-1299:
--------------------------------------

The layouts now generate:

- {{threadId}}
- {{thread}}
- {{threadPriority}}

I would be nice to rename {{thread}} to {{threadName}}.

The downside is that this would break XML and JSON consumers that expect {{thread}} and that
do not use out API to read such documents.

Therefore I did not do this rename and would like to bring it up here for discussion.

Thoughts?

> Add pattern converter for thread id and priority in PatternLayout
> -----------------------------------------------------------------
>
>                 Key: LOG4J2-1299
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1299
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core, Pattern Converters
>    Affects Versions: 2.5
>            Reporter: Remko Popma
>            Assignee: Gary Gregory
>             Fix For: 2.6
>
>
> As requested here:
> http://stackoverflow.com/questions/14359044/display-thread-id-instead-thread-name-in-log
> h2. Thread ID
> Use one of the following:
> - {{%T}}
> - {{%tid}}
> - {{%threadId}}
> h2. Thread Priority
> Use one of the following:
> - {{%tp}}
> - {{%threadPriority}}
> This create creates an incompatibility for serialization because we now have two new
{{LogEvent}} fields: thread ID and thread priority.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message