glimmerveen commented on PR #420: URL: https://github.com/apache/felix-dev/pull/420#issuecomment-2870818202
@stbischof I have made some progress, but along the way found that there is some what I would consider technical debt related to logging and its configuration. I found that this project refers to both pax-logging-api/pax-logging-service (which embeds various logging APIs (among others, SLF4j) and log4j), and it refers to logback. As pax-logging version used is quite old, the versions it embeds are also quite old, whilst the logback reference (1.3.13/1.3.15) is quite a bit more recent. This logback version is already dependent on SLF4j 2.x for instance, whilst the pax logging's highest SFL4j version is 1.6. Also it should be noted that Pax Exam is used with the forked factory, meaning that the OSGi runtime it builds is executed in a separate process, from JUnit in which Pax Exam constructs this runtime. It is in the JUnit process where any dependencies are downloaded (and where the bytes dump towards the log originates from). With the following steps I got a bit control on what happens, but this imo is still not a clean solution: * Move the logback dependencies *above all* pax logging dependencies in the maven dependencies list. This ensures that logback takes precedence on a flat class path over pax logging * Downgraded logback to 1.2.12, which still supports SLF4j 1.7 (which is more or less still compatible with the SLF4j version used by pax logging) * Added a logback-test.xml in src/test/resources to take control over the logging format & level of the logging aspects: ```xml <configuration> <!-- defined a console append --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%15.15thread] %-5level %-36.36logger{36} - %msg%n</pattern> </encoder> </appender> <logger name="shaded.org.apache.http" level="WARN" /> <root level="DEBUG"> <appender-ref ref="STDOUT" /> </root> </configuration> ``` -- 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. To unsubscribe, e-mail: dev-unsubscr...@felix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org