Class PluginLogger

java.lang.Object
org.libreoffice.ide.eclipse.core.PluginLogger

public class PluginLogger extends Object
This class is the plugin central log singleton. It supports 4 levels of messages on the contrary of the Java Logger class which contains 5. This class adds the messages to the Eclipse log view.
  • Constructor Details

    • PluginLogger

      public PluginLogger()
  • Method Details

    • debug

      public static void debug(String message, Throwable exc)
      Logs a debug message.
      Parameters:
      message - the message to log
      exc - the exception causing the message
    • debug

      public static void debug(String message)
      Logs a debug message.
      Parameters:
      message - the message to log
    • info

      public static void info(String message)
      Logs a information message.
      Parameters:
      message - the message to log
    • warning

      public static void warning(String message)
      Logs a warning message.
      Parameters:
      message - the message to log
    • warning

      public static void warning(String message, Throwable exc)
      Logs a warning message caused by an exception.
      Parameters:
      message - the message to log
      exc - exception raised. Could be null
    • error

      public static void error(String message, Throwable exc)
      Logs an error message an optionally the stack trace of the exception which causes the error.
      Parameters:
      message - Message to print in the error log view
      exc - Exception raised. Could be null.
    • error

      public static void error(String message)
      Logs an error message without cause exception.
      Parameters:
      message - Message to print in the error log view
    • setLevel

      public static void setLevel(LogLevels level)
      Changes the minimum level of the message printed to the log view.
      Parameters:
      level - the level to set
    • isLevel

      public static boolean isLevel(LogLevels level)
      Checks whether the logger will return a message of a certain level.
      Parameters:
      level - the level of the message to print
      Returns:
      true if the level is higher or equals to the current log level.