You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2018/02/18 07:10:00 UTC

[jira] [Commented] (LOG4J2-2251) PatternLayout not worling properly

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

Ralph Goers commented on LOG4J2-2251:
-------------------------------------

We are going to need you to provide a test that demonstrates this problem. PatternSelectorTest uses %M and %L and does not have a problem. Furthermore, I have many applications using %M and %L that don't have problems.

> PatternLayout not worling properly
> ----------------------------------
>
>                 Key: LOG4J2-2251
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2251
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.10.0
>            Reporter: Cristian Manuel Vertiz Fernandez
>            Priority: Major
>
> In PatternLayout log not worling for %M (%method) and %L (%line)
>  
> Example log4j2.properties
>  
> {noformat}
> appender.console.type = Console
> appender.console.name = STDOUT
> appender.console.layout.type = PatternLayout
> appender.console.layout.pattern = %d{yyyy-MM-dd' 'HH:mm:ss,SSSZ} %-5p [%t] %c{10}:%M:%L - %m%n 
> logger.console.name = my.package
> logger.console.level = info
> logger.console.additivity = false
> logger.console.appenderRef.rolling.ref = STDOUT
> rootLogger.level = info
> rootLogger.appenderRef.stdout.ref = STDOUT
> {noformat}
>  
> Current output is:
> {noformat}
> 2018-02-14 15:57:00,001-0400 INFO  [myThread] my.package.MyClass:: - some log message{noformat}
>  
> Expected outoput is:
> {noformat}
> 2018-02-14 15:57:00,001-0400 INFO  [myThread] my.package.MyClass:myMethod:10 - some log message{noformat}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)