You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Alexandra Cohen (JIRA)" <ji...@apache.org> on 2015/11/28 13:46:11 UTC

[jira] [Comment Edited] (LOG4J2-382) PatternLayout: truncating from the end

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

Alexandra Cohen edited comment on LOG4J2-382 at 11/28/15 12:45 PM:
-------------------------------------------------------------------

I tried log4j2 v.2.4.1 with property  
<PatternLayout pattern="[%-1level{length=1}] ........ />
And it works correctly - prints the 1st letter of the log level.


was (Author: alvcohen):
I tried log4j2 v.2.4.1 with property  <PatternLayout pattern="[%-1level{length=1}] ........ />
And it works correctly - prints the 1st letter of the log level.

> PatternLayout: truncating from the end
> --------------------------------------
>
>                 Key: LOG4J2-382
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-382
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>            Reporter: Alexey Pomelov
>
> The first case I've met: I'd like to print only first letter of the log record priority. %1.1p leads to R,N,O,G,E letters (not very friendly).
> For example it will be nice to specify a negative number after dot and truncate token from the end.



--
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