java.lang.Object
com.github.markusbernhardt.proxy.util.Logger

public class Logger extends Object
Simple logging support for the framework. You need to add a logging listener that needs to send the logging events to a backend.
  • Field Details

  • Constructor Details

    • Logger

      public Logger()
  • Method Details

    • getBackend

      public static Logger.LogBackEnd getBackend()
      Gets the currently attached logging backend.
      Returns:
      Returns the backend.
    • setBackend

      public static void setBackend(Logger.LogBackEnd backend)
      Attaches a new logging backend replacing the existing one.
      Parameters:
      backend - The backend to set.
    • log

      public static void log(Class<?> clazz, Logger.LogLevel loglevel, String msg, Object... params)
      Logs a message.
      Parameters:
      clazz - the class that sends the log message.
      loglevel - the logging level.
      msg - the message format string.
      params - the message parameters for the format string.