Package org.libreoffice.ide.eclipse.core
Class PluginLogger
- java.lang.Object
-
- org.libreoffice.ide.eclipse.core.PluginLogger
-
public class PluginLogger extends java.lang.ObjectThis class is the plugin central log singleton. It supports 4 levels of messages on the contrary of the JavaLoggerclass which contains 5. This class adds the messages to the Eclipse log view.
-
-
Constructor Summary
Constructors Constructor Description PluginLogger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebug(java.lang.String pMessage)Logs a debug message.static voiddebug(java.lang.String pMessage, java.lang.Throwable pExc)Logs a debug message.static voiderror(java.lang.String pMessage)Logs an error message without cause exception.static voiderror(java.lang.String pMessage, java.lang.Throwable pExc)Logs an error message an optionally the stack trace of the exception which causes the error.static voidinfo(java.lang.String pMessage)Logs a information message.static booleanisLevel(LogLevels pLevel)Checks whether the logger will return a message of a certain level.static voidsetLevel(LogLevels pLevel)Changes the minimum level of the message printed to the log view.static voidwarning(java.lang.String pMessage)Logs a warning message.static voidwarning(java.lang.String pMessage, java.lang.Throwable pExc)Logs a warning message caused by an exception.
-
-
-
Method Detail
-
debug
public static void debug(java.lang.String pMessage, java.lang.Throwable pExc)Logs a debug message.- Parameters:
pMessage- the message to logpExc- the exception causing the message
-
debug
public static void debug(java.lang.String pMessage)
Logs a debug message.- Parameters:
pMessage- the message to log
-
info
public static void info(java.lang.String pMessage)
Logs a information message.- Parameters:
pMessage- the message to log
-
warning
public static void warning(java.lang.String pMessage)
Logs a warning message.- Parameters:
pMessage- the message to log
-
warning
public static void warning(java.lang.String pMessage, java.lang.Throwable pExc)Logs a warning message caused by an exception.- Parameters:
pMessage- the message to logpExc- exception raised. Could benull
-
error
public static void error(java.lang.String pMessage, java.lang.Throwable pExc)Logs an error message an optionally the stack trace of the exception which causes the error.- Parameters:
pMessage- Message to print in the error log viewpExc- Exception raised. Could benull.
-
error
public static void error(java.lang.String pMessage)
Logs an error message without cause exception.- Parameters:
pMessage- Message to print in the error log view
-
setLevel
public static void setLevel(LogLevels pLevel)
Changes the minimum level of the message printed to the log view.- Parameters:
pLevel- the level to set
-
isLevel
public static boolean isLevel(LogLevels pLevel)
Checks whether the logger will return a message of a certain level.- Parameters:
pLevel- the level of the message to print- Returns:
trueif the level is higher or equals to the current log level.
-
-