Hello! Even more integration tests (including Logback) - I finally created the tests I always wanted - that restart/refresh pax-logging bundles inside the test itself!
I finished Log4J1 cleanup, the API/Implementation is separated the best way I could do it. Everything is described in the readme - https://github.com/ops4j/org.ops4j.pax.logging/blob/master-improvements/readme.adoc . I even described *all* packages from log4j:log4j and log4j:apache-log4j-extras: https://github.com/ops4j/org.ops4j.pax.logging/tree/master-improvements#summary-of-package-splitting-for-log4j1 - where does given package come from, in which bundles it's Private-Packaged or Export-Packaged (or both!). There's even nice table summarizing log levels/thresholds for Syslog/Log4J1/Log4J2/Logback/Slf4J/JUL/OSGi: https://github.com/ops4j/org.ops4j.pax.logging/blob/master-improvements/readme.adoc#level-and-threshold I took care that pax-logging project doesn't include *any* unchanged source file from log4j (or extras) - everything is either included and changed, or embedded using Private|Export-Package or maven-dependency-plugin:unpack (yes - it was needed). Details are described in: - osgi.bnd file for pax-logging-service: https://github.com/ops4j/org.ops4j.pax.logging/blob/master-improvements/pax-logging-service/osgi.bnd#L22-L45 - pom.xml file for pax-logging-service: https://github.com/ops4j/org.ops4j.pax.logging/blob/master-improvements/pax-logging-service/pom.xml#L97-L142 – [INFO] Tests run: 1, Time elapsed: 1.264 s - AllLoggingFacadesIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.254 s - CleanIntegrationTest – [INFO] Tests run: 4, Time elapsed: 1.310 s - DefaultLogIntegrationTest – [INFO] Tests run: 2, Time elapsed: 1.349 s - DefaultLogThresholdIntegrationTest – [INFO] Tests run: 2, Time elapsed: 1.343 s - DefaultLogToFileSingletonIntegrationTest – [INFO] Tests run: 4, Time elapsed: 1.511 s - Log4J1BuiltinAppendersIntegrationTest – [INFO] Tests run: 9, Time elapsed: 1.498 s - Log4J1IntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.436 s - Log4J1LocationInfoIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.403 s - Log4J1MDCIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.355 s - Log4J1OsgiAppendersIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.360 s - Log4J1OsgiErrorHandlersIntegrationTest – [INFO] Tests run: 2, Time elapsed: 1.430 s - Log4J1OsgiLayoutsIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.414 s - Log4J1*RefreshPaxLoggingApi* IntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.521 s - Log4J1 *RestartBothPaxLoggingBundles*IntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.441 s - Log4J1*RestartPaxLoggingApi* IntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.529 s - Log4J1 *RestartPaxLoggingService*IntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.455 s - Log4J1UpdateJULLoggerLevelsIntegrationTest – [INFO] Tests run: 1, Time elapsed: 3.390 s - Log4J1WithConfigAdminIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.457 s - Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.363 s - Log4J1WithDefaultConfigurationIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.458 s - Log4J1WithoutEventAdminIntegrationTest – [INFO] Tests run: 4, Time elapsed: 1.411 s - LogbackIntegrationTest – [INFO] Tests run: 1, Time elapsed: 3.374 s - LogbackWithConfigAdminIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.423 s - LogbackWithDefaultConfigurationAndNoLogbackDebugIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.406 s - LogbackWithDefaultConfigurationIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.352 s - LogbackWithoutEventAdminIntegrationTest – [INFO] Tests run: 1, Time elapsed: 1.356 s - SimplestPaxLoggingServiceIntegrationTest best regards Grzegorz Grzybek wt., 14 maj 2019 o 15:45 Grzegorz Grzybek <[email protected]> napisał(a): > Hello > > I continue my work on making pax-logging more maintainable. > > The branch with work-in-progress is here > <https://github.com/ops4j/org.ops4j.pax.logging/tree/master-improvements> > - check the long(ish) readme. > > Here are integration tests in 1.10.1: > > Running org.ops4j.pax.logging.it.appender.CustomAppenderTest > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.28 sec - > in org.ops4j.pax.logging.it.appender.CustomAppenderTest > > Results : > > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 > > And here are tests I did so far: > > [INFO] Running org.ops4j.pax.logging.it.AllLoggingFacadesIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.544 s - in org.ops4j.pax.logging.it.AllLoggingFacadesIntegrationTest > [INFO] Running org.ops4j.pax.logging.it.CleanIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.428 s - in org.ops4j.pax.logging.it.CleanIntegrationTest > [INFO] Running org.ops4j.pax.logging.it.DefaultLogIntegrationTest > [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.533 s - in org.ops4j.pax.logging.it.DefaultLogIntegrationTest > [INFO] Running org.ops4j.pax.logging.it.DefaultLogThresholdIntegrationTest > [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.512 s - in org.ops4j.pax.logging.it.DefaultLogThresholdIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.DefaultLogToFileSingletonIntegrationTest > [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.486 s - in > org.ops4j.pax.logging.it.DefaultLogToFileSingletonIntegrationTest > [INFO] Running org.ops4j.pax.logging.it.Log4J1IntegrationTest > [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.729 s - in org.ops4j.pax.logging.it.Log4J1IntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1RefreshPaxLoggingApiIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.742 s - in > org.ops4j.pax.logging.it.Log4J1RefreshPaxLoggingApiIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1RestartBothPaxLoggingBundlesIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.603 s - in > org.ops4j.pax.logging.it.Log4J1RestartBothPaxLoggingBundlesIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingApiIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.608 s - in > org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingApiIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingServiceIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.707 s - in > org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingServiceIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1WithConfigAdminIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.632 s - in org.ops4j.pax.logging.it.Log4J1WithConfigAdminIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.619 s - in > org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.601 s - in > org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationIntegrationTest > [INFO] Running > org.ops4j.pax.logging.it.SimplestPaxLoggingServiceIntegrationTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.491 s - in > org.ops4j.pax.logging.it.SimplestPaxLoggingServiceIntegrationTest > [INFO] > [INFO] Results: > [INFO] > [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0 > > (Among others - tests related to restarting and refreshing > pax-logging-bundles during the test). > > As for API separation - I clearly described it in new readme - some > org.apache.log4j.* packages are imported from pax-logging-api to > pax-logging-service, but some has to be shaded there. > I ensured that the classes that are not changed comparing to original > classes from log4j:log4j are not kept in pax-logging source tree. > > I have good foundation to unify logback and log4j2 itests and make two > kinds of extensibility common to all the backends: > - through fragments attached to pax-logging-service, pax-logging-logback > and pax-logging-log4j2 > - through registration of services implementing org.ops4j.pax.logging.spi > interfaces, and referenced by "osgi:" prefixed entries in config files. > > regards > Grzegorz Grzybek > -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAAdXmhoFH7YeLNWRnf8OT0H3jNiWFH6ekd8ymezUYUv20f-DFg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
