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

Mikael Ståldal commented on LOG4J2-1572:
----------------------------------------

Yes, add our SNAPSHOT repository to your Maven settings, and you can try 
version 2.6.3-SNAPSHOT.

https://repository.apache.org/content/repositories/snapshots/

> Empty NDC stack logs null
> -------------------------
>
>                 Key: LOG4J2-1572
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1572
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.6.2
>            Reporter: Johno Crawford
>            Assignee: Mikael Ståldal
>            Priority: Trivial
>             Fix For: 2.7
>
>
> Expected behavior
> When the NDC stack is empty nothing should be logged (regression in log4j 
> 2.x, the functionality behaves this way in log4j 1.2).
> ex. 2016-09-09 09:54:44,212 INFO  [main] Main (Main.java:6) - huuhaa
> Actual behavior
> When the NDC stack is empty null is logged.
> ex. 2016-09-09 09:54:44,212 INFO  [main] Main (Main.java:6) - huuhaa null
> {code:java}
> import org.apache.logging.log4j.LogManager;
> public class Main {
>     public static void main(String[] args) {
>         LogManager.getLogger(Main.class).info("huuhaa");
>     }
> }
> {code}
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration>
>   <Appenders>
>     <Console name="STDOUT" target="SYSTEM_OUT">
>       <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m %x%n"/>
>     </Console>
>   </Appenders>
>   <Loggers>
>     <Root level="INFO">
>       <AppenderRef ref="STDOUT"/>
>     </Root>
>   </Loggers>
> </Configuration>
> {code}



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