Java: Adding to the classpath

The most direct way to get the logs-in-context extensions is to add the dependencies to Maven's pom.xml or Gradle's build.gradle. This allows the packaging tools pick up the correct dependencies.

If you are unable to modify the application and repackage it, you can still set up logs-in-context by making some additions to your classpath.

Classpath prerequisites

Before you modify the classpath:

  • You must know the logging framework the application is using.
  • You must be able to configure the logging framework because the logs-in-context configuration requires changes to your logging configuration.

Classpath additions

Add the following three jars to the classpath if they aren't already present. Generally, we recommend taking the latest versions published on Maven Central.

For more help

Recommendations for learning more: