Package org.eclipse.core.runtime
Interface ILog
public interface ILog
A 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
Modifier and TypeMethodDescriptionvoid
addLogListener
(ILogListener listener) Adds the given log listener to this log.default void
Logs a status withIStatus.ERROR
using this loggerBundle.getSymbolicName()
as pluginIddefault void
Logs a status withIStatus.ERROR
using this loggerBundle.getSymbolicName()
as pluginIdstatic ILog
get()
Returns the log for the bundle of the calling class.Returns the plug-in with which this log is associated.default void
Logs a status withIStatus.INFO
using this loggerBundle.getSymbolicName()
as pluginIddefault void
Logs a status withIStatus.INFO
using this loggerBundle.getSymbolicName()
as pluginIdvoid
Logs the given status.static ILog
Returns the log for the bundle of the given class.static ILog
Returns the log for the given bundle.void
removeLogListener
(ILogListener listener) Removes the given log listener to this log.default void
Logs a status withIStatus.WARNING
using this loggerBundle.getSymbolicName()
as pluginIddefault void
Logs a status withIStatus.WARNING
using this loggerBundle.getSymbolicName()
as pluginId
-
Method Details
-
addLogListener
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:
-
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
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
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:
-
info
Logs a status withIStatus.INFO
using this loggerBundle.getSymbolicName()
as pluginId- Parameters:
message
- the message to log- Since:
- 3.17
-
info
Logs a status withIStatus.INFO
using this loggerBundle.getSymbolicName()
as pluginId- Parameters:
message
- the message to logthrowable
- an optional throwable to associate with this status- Since:
- 3.17
-
warn
Logs a status withIStatus.WARNING
using this loggerBundle.getSymbolicName()
as pluginId- Parameters:
message
- the message to log- Since:
- 3.17
-
warn
Logs a status withIStatus.WARNING
using this loggerBundle.getSymbolicName()
as pluginId- Parameters:
message
- the message to logthrowable
- an optional throwable to associate with this status- Since:
- 3.17
-
error
Logs a status withIStatus.ERROR
using this loggerBundle.getSymbolicName()
as pluginId- Parameters:
message
- the message to log- Since:
- 3.17
-
error
Logs a status withIStatus.ERROR
using this loggerBundle.getSymbolicName()
as pluginId- Parameters:
message
- the message to logthrowable
- an optional throwable to associate with this status- Since:
- 3.17
-
of
Returns the log for the given bundle. If no such log exists, one is created.- Parameters:
bundle
- the bundle whose log is returned- Returns:
- the log for the given bundle
- Since:
- 3.29
-
of
Returns the log for the bundle of the given class. If no such log exists, one is created.- Parameters:
clazz
- the class in a bundle whose log is returned- Returns:
- the log for the bundle to which the clazz belongs
- Since:
- 3.29
-
get
Returns the log for the bundle of the calling class. If no such log exists, one is created.- Returns:
- the log for the bundle to which the caller belongs
- Since:
- 3.29
-