reportportal/logger-java-logback

Logback logger doesn't work with Logback versions higher than 1.2.11

endless-qa opened this issue · 1 comments

Describe the bug
I added the logger-java-logback dependency of version 5.1.3, then added the logback-classic dependency itself of version 1.2.10. Added all required configurations as suggested here, in documentation. My test logs were streamed to Report Portal. Then I realised that the latest Logback version is 1.4.3 and updated it in my pom.xml. After that, my test logs stopped appearing on Report Portal.

By experimenting with the Logback versions, I found that Report Portal's logger-java-logback works only with Logback 1.2.11, and afther that - no logs are streamed to RP.

Steps to Reproduce

  1. Add logger-java-logback latest dependency (5.1.3) to pom.xml
  2. Add logback-classic latest dependency (1.4.3) to pom.xml
  3. Add logback.xml to the /resources folder.
    <configuration><appender name="ReportPortalAppender" class="com.epam.reportportal.logback.appender.ReportPortalAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n</pattern> </encoder> </appender> <root level="all"> <appender-ref ref="ReportPortalAppender" /> </root> </configuration>
  4. Run the tests, check if test logs appeared on Report Portal.

Expected behavior
Test logs appear on Report Portal when using the latest (1.4.3) version of Logback

Actual behavior
Test logs do not appear on Report Portal if Logback dependency of version higher than 1.2.11 used.

Dependency versions

  • agent-java-junit5: 5.1.5
  • logger-java-logback: 5.1.3
  • logback-classic: 1.4.3

Additional context
Add any other context about the problem here.

@endless-qa I cannot confirm any issues with our logger. I just prepared a test project for educational matters and it works fine with Slf4j 2.0.6 and Logback-classic 1.4.5 along with logger-java-logback version 5.1.3:
https://github.com/HardNorth/rp-junit5-integrations

Be aware that almost every logger in the world issued many versions last year due to Log4Shell, not all of them compatible altogether. E.G. SLF4J 2.0.0 requires logback 1.3.0+ or it just won't work.