Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AgentPremain

        public AgentPremain()
    • 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 space
        instrumentation - 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 framework
        separator - 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.