[ 
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:49 PM:
-------------------------------------------------------------------

I tried log4j2 v.2.4.1 with property  
{code:xml} <PatternLayout pattern="[%-1level{length=1}]" /> {code}
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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to