• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
3<html>
4<head>
5<title></title>
6</head>
7
8
9<body>
10<p>"-javaagent" routines for SLF4J.</p>
11<p>The "-javaagent" flag provided in Java 5+ allows for writing
12agents in Java, which previously was possible in native code only. The
13full details are available at <a
14	href="http://java.sun.com/javase/6/docs/api/java/lang/instrument/package-summary.html">http://java.sun.com/javase/6/docs/api/java/lang/instrument/package-summary.html</a>.
15
16
17Please notice that code made available to the java agent is also
18available to the actual program executed.</p>
19<p>The slf4j-ext-X.Y.Z.jar file provides such a java agent, which is
20implemented in AgentPremain.java.  It is used by adding a -javaagent flag to the Java command line:
21
22E.g.
23<pre><code>java HelloWorld</code></pre>
24is changed to
25<pre><code>java -javaagent:/path/to/slf4j-ext-X.Y.Z.jar=<em>OPTIONS</em> HelloWorld</code></pre>
26
27<p>What is actually done, depends on the <em>OPTIONS</em> passed to the agent.  These are listed in AgentOptions.java.
28
29</body>
30</html>
31