Class Logger


  • public class Logger
    extends java.lang.Object
    Clients of the disco.agent.reflect package may supply logging callbacks for better visibility what is happening when they call the methods provided by the package, and to enable Logging from the DiSCo agent itself, using a supplied LoggerFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      Logger()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void debug​(java.lang.String s)
      Log a debug message
      static void error​(java.lang.String s)
      Log an error message
      static void info​(java.lang.String s)
      Log an info message
      static void installLoggerFactory​(LoggerFactory loggerFactory)
      Install a LoggerFactory to be used throughout the DiSCo agent.
      static void suppressIfAgentNotPresent​(boolean suppress)
      Set whether to suppress messages when the agent is not present.
      static void warn​(java.lang.String s)
      Log a warning message
      • Methods inherited from class java.lang.Object

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

      • Logger

        public Logger()
    • Method Detail

      • installLoggerFactory

        public static void installLoggerFactory​(LoggerFactory loggerFactory)
        Install a LoggerFactory to be used throughout the DiSCo agent.
        Parameters:
        loggerFactory - the client-supplied LoggerFactory instance to be used
      • debug

        public static void debug​(java.lang.String s)
        Log a debug message
        Parameters:
        s - the message
      • info

        public static void info​(java.lang.String s)
        Log an info message
        Parameters:
        s - the message
      • warn

        public static void warn​(java.lang.String s)
        Log a warning message
        Parameters:
        s - the message
      • error

        public static void error​(java.lang.String s)
        Log an error message
        Parameters:
        s - the message
      • suppressIfAgentNotPresent

        public static void suppressIfAgentNotPresent​(boolean suppress)
        Set whether to suppress messages when the agent is not present. By default logging is produced regardless of the Agent being present or not
        Parameters:
        suppress - false to suppress logging when no Agent is present