public class LogUtil extends Object
Modifier and Type | Method and Description |
---|---|
String |
getPluginId() |
int |
getStyle() |
IStatus |
log(int severity,
String message,
Object... arguments) |
IStatus |
log(int severity,
Throwable cause,
String message,
Object... arguments)
Creates and handles a status object.
|
IStatus |
logError(String message,
Object... arguments) |
IStatus |
logError(Throwable e) |
IStatus |
logError(Throwable e,
String message,
Object... arguments) |
void |
setStyle(int style) |
IStatus |
trace(String message,
Object... arguments) |
public LogUtil(String pluginId)
public int getStyle()
public void setStyle(int style)
public String getPluginId()
public IStatus log(int severity, Throwable cause, String message, Object... arguments)
severity
- the severity of the error. This is one of IStatus
' severity constants, see IStatus.getSeverity()
.cause
- an exception that has caused the problem. May be null
if message is not null
. If this is a CoreException
, the method will generate a MultiStatus containing the nested status object and the severity argument will be ignored.message
- a message describing the problem to log. This may contain patterns as described for MessageFormat.format(String, Object...)
. It may be null if a cause has been given.arguments
- optional arguments that get merged into the message as described at MessageFormat.format(String, Object...)
.