Package org.slf4j.agent
Class AgentPremain
- java.lang.Object
-
- org.slf4j.agent.AgentPremain
-
public class AgentPremain extends java.lang.Object
Entry point for slf4j-ext when used as a Java agent.
-
-
Constructor Summary
Constructors Constructor Description AgentPremain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.Properties
parseArguments(java.lang.String agentArgument, java.lang.String separator)
Consider the argument string to be a property file (by converting the splitter character to line feeds), and then reading it like any other property file.static void
premain(java.lang.String agentArgument, java.lang.instrument.Instrumentation instrumentation)
JavaAgent premain entry point as specified in the MANIFEST.MF file.private static void
printStartStopTimes()
Print the start message to System.err with the time NOW, and register a shutdown hook which will print the stop message to System.err with the time then and the number of milliseconds passed since.
-
-
-
Method Detail
-
premain
public static void premain(java.lang.String agentArgument, java.lang.instrument.Instrumentation instrumentation)
JavaAgent premain entry point as specified in the MANIFEST.MF file. See http://java.sun.com/javase/6/docs/api/java/lang/instrument/package-summary.html for details.- Parameters:
agentArgument
- string provided after "=" up to first spaceinstrumentation
- instrumentation environment provided by the JVM
-
parseArguments
private static java.util.Properties parseArguments(java.lang.String agentArgument, java.lang.String separator)
Consider the argument string to be a property file (by converting the splitter character to line feeds), and then reading it like any other property file.- Parameters:
agentArgument
- string given by instrumentation frameworkseparator
- String to convert to line feeds- Returns:
- argument converted to properties
-
printStartStopTimes
private static void printStartStopTimes()
Print the start message to System.err with the time NOW, and register a shutdown hook which will print the stop message to System.err with the time then and the number of milliseconds passed since.
-
-