You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2019/12/08 17:28:53 UTC

[GitHub] [logging-log4j2] fedexist commented on issue #306: [LOG4J2-2678] Add LogEvent timestamp to Kafka ProducerRecord

fedexist commented on issue #306: [LOG4J2-2678] Add LogEvent timestamp to Kafka ProducerRecord
URL: https://github.com/apache/logging-log4j2/pull/306#issuecomment-562972161
 
 
   > I applied this to master and when I ran the test I get
   > 
   > ```
   > [INFO] Running org.apache.logging.log4j.kafka.appender.KafkaAppenderTest
   > [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.442 s <<< FAILURE! - in org.apache.logging.log4j.kafka.appender.KafkaAppenderTest
   > [ERROR] testAppenderNoEventTimestamp(org.apache.logging.log4j.kafka.appender.KafkaAppenderTest)  Time elapsed: 0.025 s  <<< FAILURE!
   > java.lang.AssertionError: Appender named KafkaAppenderNoEventTimestamp was null.
   > 	at org.apache.logging.log4j.kafka.appender.KafkaAppenderTest.testAppenderNoEventTimestamp(KafkaAppenderTest.java:155)
   > 
   > [INFO] 
   > [INFO] Results:
   > [INFO] 
   > [ERROR] Failures: 
   > [ERROR]   KafkaAppenderTest.testAppenderNoEventTimestamp:155 Appender named KafkaAppenderNoEventTimestamp was null.
   > [INFO] 
   > [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0
   > ```
   > 
   > Also, if you would like this as part of a Log4j 2.x release please provide an equivalent patch to the release-2.x branch.
   
   Hi @rgoers, I had this issue too, but then I found out that this error is caused by the old `KafkaAppenderTest.xml` still getting loaded, instead of the updated one (which is containing the new appender config). This file is within the test resources of the `log4j-core` module. If you run `mvn install` for log4j-core, then it will install the updated `log4j-core` module and tests for log4j-kafka should pass.
   
   I guess it would be reasonable to move `KafkaAppenderTest.xml` and `KafkaAppenderCloseTimeoutTest.xml` to the `log4j-kafka` test resources, anyway.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services