Class | Description |
---|---|
AgentOptions |
All recognized options in the string passed to the java agent.
|
AgentPremain |
Entry point for slf4j-ext when used as a Java agent.
|
"-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 http://java.sun.com/javase/6/docs/api/java/lang/instrument/package-summary.html. 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 AgentPremain.java. 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 AgentOptions.java.
Copyright © 2021 JBoss by Red Hat. All rights reserved.