Package org.eclipse.core.runtime
Interface ILog
-
public interface ILogA log to which status events can be written. Logs appear on individual plug-ins and on the platform itself. Clients can register log listeners which will receive notification of all log events as they come in.XXX Need to create a new log interface on common plugin. That interface should be a super interface of this ILog. getBundle() would stay here. In the super interface we would have getName()
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddLogListener(ILogListener listener)Adds the given log listener to this log.default voiderror(String message)Logs a status withIStatus.ERRORusing this loggerBundle.getSymbolicName()as pluginIddefault voiderror(String message, Throwable throwable)Logs a status withIStatus.ERRORusing this loggerBundle.getSymbolicName()as pluginIdBundlegetBundle()Returns the plug-in with which this log is associated.default voidinfo(String message)Logs a status withIStatus.INFOusing this loggerBundle.getSymbolicName()as pluginIddefault voidinfo(String message, Throwable throwable)Logs a status withIStatus.INFOusing this loggerBundle.getSymbolicName()as pluginIdvoidlog(IStatus status)Logs the given status.voidremoveLogListener(ILogListener listener)Removes the given log listener to this log.default voidwarn(String message)Logs a status withIStatus.WARNINGusing this loggerBundle.getSymbolicName()as pluginIddefault voidwarn(String message, Throwable throwable)Logs a status withIStatus.WARNINGusing this loggerBundle.getSymbolicName()as pluginId
-
-
-
Method Detail
-
addLogListener
void addLogListener(ILogListener listener)
Adds the given log listener to this log. Subsequently the log listener will receive notification of all log events passing through this log. This method has no effect if the identical listener is already registered on this log.- Parameters:
listener- the listener to add to this log- See Also:
Platform.addLogListener(ILogListener)
-
getBundle
Bundle getBundle()
Returns the plug-in with which this log is associated.- Returns:
- the plug-in with which this log is associated
- Since:
- 3.0
-
log
void log(IStatus status)
Logs the given status. The status is distributed to the log listeners installed on this log and then to the log listeners installed on the platform.- Parameters:
status- the status to log
-
removeLogListener
void removeLogListener(ILogListener listener)
Removes the given log listener to this log. Subsequently the log listener will no longer receive notification of log events passing through this log. This method has no effect if the identical listener is not registered on this log.- Parameters:
listener- the listener to remove- See Also:
Platform.removeLogListener(ILogListener)
-
info
default void info(String message)
Logs a status withIStatus.INFOusing this loggerBundle.getSymbolicName()as pluginId- Parameters:
message- the message to log- Since:
- 3.17
-
info
default void info(String message, Throwable throwable)
Logs a status withIStatus.INFOusing this loggerBundle.getSymbolicName()as pluginId- Parameters:
message- the message to logthrowable- an optional throwable to associate with this status- Since:
- 3.17
-
warn
default void warn(String message)
Logs a status withIStatus.WARNINGusing this loggerBundle.getSymbolicName()as pluginId- Parameters:
message- the message to log- Since:
- 3.17
-
warn
default void warn(String message, Throwable throwable)
Logs a status withIStatus.WARNINGusing this loggerBundle.getSymbolicName()as pluginId- Parameters:
message- the message to logthrowable- an optional throwable to associate with this status- Since:
- 3.17
-
error
default void error(String message)
Logs a status withIStatus.ERRORusing this loggerBundle.getSymbolicName()as pluginId- Parameters:
message- the message to log- Since:
- 3.17
-
error
default void error(String message, Throwable throwable)
Logs a status withIStatus.ERRORusing this loggerBundle.getSymbolicName()as pluginId- Parameters:
message- the message to logthrowable- an optional throwable to associate with this status- Since:
- 3.17
-
-