[slf4j-dev] svn commit: r1218 - slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/agent
ravn at slf4j.org
ravn at slf4j.org
Mon Oct 27 22:33:31 CET 2008
Author: ravn
Date: Mon Oct 27 22:33:31 2008
New Revision: 1218
Modified:
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/agent/AgentPremain.java
Log:
added javadoc
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/agent/AgentPremain.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/agent/AgentPremain.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/agent/AgentPremain.java Mon Oct 27 22:33:31 2008
@@ -10,6 +10,10 @@
import org.slf4j.instrumentation.LogTransformer;
+/**
+ * Entry point for slf4j-ext when used as a Java agent.
+ *
+ */
public class AgentPremain {
private static final String START_MSG = "Start at {}";
@@ -35,23 +39,21 @@
if (agentArgument != null) {
Properties args = parseArguments(agentArgument, ";");
- if (args.containsKey("verbose")) {
+ if (args.containsKey(AgentOptions.VERBOSE)) {
builder = builder.verbose(true);
}
- if (args.containsKey("time")) {
+ if (args.containsKey(AgentOptions.TIME)) {
printStartStopTimes();
}
- if (args.containsKey("ignore")) {
- builder = builder.ignore(args.getProperty("ignore").split(","));
+ if (args.containsKey(AgentOptions.IGNORE)) {
+ builder = builder.ignore(args.getProperty(AgentOptions.IGNORE).split(","));
}
- if (args.containsKey("level")) {
- builder = builder.level(args.getProperty("level"));
+ if (args.containsKey(AgentOptions.LEVEL)) {
+ builder = builder.level(args.getProperty(AgentOptions.LEVEL));
}
-
- // ... more agent option handling here
}
instrumentation.addTransformer(builder.build());
More information about the slf4j-dev
mailing list