Package org.slf4j.agent

"-javaagent" routines for SLF4J.


Class Summary
AgentOptions All recognized options in the string passed to the java agent.
AgentPremain Entry point for slf4j-ext when used as a Java agent.

Package org.slf4j.agent Description

"-javaagent" routines for SLF4J.

The "-javaagent" flag provided in Java 5+ allows for writing agents in Java, which previously was possible in native code only. The full details are available at Please notice that code made available to the java agent is also available to the actual program executed.

The slf4j-ext-X.Y.Z.jar file provides such a java agent, which is implemented in It is used by adding a -javaagent flag to the Java command line: E.g.

java HelloWorld
is changed to
java -javaagent:/path/to/slf4j-ext-X.Y.Z.jar=OPTIONS HelloWorld
What is actually done, depends on the OPTIONS passed to the agent. These are listed in

Copyright © 2005–2015 All rights reserved.