[ https://issues.apache.org/jira/browse/LOG4J2-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394333#comment-15394333 ]
Roman Koretskiy commented on LOG4J2-1481: ----------------------------------------- for current pattern expected to see first two level of hierarchy in logger's name. Example's expected output: {noformat} 1331:2016-07-26 08:02:47,871 | http-nio-8080-exec-4 | [TRACE] hu.daniel.~.~.~.~.~.MyClass - This is a trace message. 1332:2016-07-26 08:02:47,871 | http-nio-8080-exec-4 | [DBG ] hu.daniel.~.~.~.~.~.MyClass - This is a debug message. 1333:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [INF ] hu.daniel.~.~.~.~.~.MyClass - This is an info message. 1334:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [WARN ] hu.daniel.~.~.~.~.~.MyClass - This is a warn message. 1335:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [ERROR] hu.daniel.~.~.~.~.~.MyClass - This is an error message. 1336:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [FATAL] hu.daniel.~.~.~.~.~.MyClass - This is a fatal message. {noformat} > Wrong logger's name in patterns with long output > ------------------------------------------------ > > Key: LOG4J2-1481 > URL: https://issues.apache.org/jira/browse/LOG4J2-1481 > Project: Log4j 2 > Issue Type: Bug > Affects Versions: 2.6.2 > Reporter: Roman Koretskiy > Priority: Minor > > Wrong logger's name in output in some patterns. > In version 2.5 everything works like expected. > h2. Example > Pattern : > {noformat} > %sn:%d{yyyy-MM-dd HH:mm:ss,SSS} | %t | [%highlight{%-5level{DEBUG=DBG, > INFO=INF}}{STYLE=Logback, WARN=Yellow}] %c{9.9*.~} > %style{%varsNotEmpty{[%marker] }}{bright}- %msg%n > {noformat} > i have output like: > {noformat} > 1331:2016-07-26 08:02:47,871 | http-nio-8080-exec-4 | [TRACE] > hu.daniel.~.~.~.~.~.MyClass - This is a trace message. > 1332:2016-07-26 08:02:47,871 | http-nio-8080-exec-4 | [DBG ] > hu.daniel.~.~.~.~.~.MyClass - This is a debug message. > 1333:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [INF ] > hu.~.~.~.~.~.~.MyClass - This is an info message. > 1334:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [WARN ] > hu.~.~.~.~.~.~.MyClass - This is a warn message. > 1335:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [ERROR] > ~.~.~.~.~.~.~.MyClass - This is an error message. > 1336:2016-07-26 08:02:47,872 | http-nio-8080-exec-4 | [FATAL] > ~.~.~.~.~.~.~.MyClass - This is a fatal message. > {noformat} > example taken not from my logs, but i have same log4j behaviour in my system. -- 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