org.eclipse.wst.common.environment
Interface ILog


public interface ILog

ILog objects provide a means for logging information for FFDC etc.

Since:
1.0

Field Summary
static int ERROR
          This constant indicates that a logging message is an error.
static int INFO
          This constant indicates that a logging message is informational.
static int OK
          This constant indicates that a logging message is Ok.
static int WARNING
          This constant indicates that a logging message is warning.
 
Method Summary
 boolean isEnabled()
          Returns true if logging is enabled.
 boolean isEnabled(java.lang.String option)
          Returns true if this debug option is set to true.
 void log(int severity, int messageNum, java.lang.Object caller, java.lang.String method, org.eclipse.core.runtime.IStatus status)
          Logs a Status.
 void log(int severity, int messageNum, java.lang.Object caller, java.lang.String method, java.lang.Object object)
          Logs an Object.
 void log(int severity, int messageNum, java.lang.Object caller, java.lang.String method, java.lang.Throwable throwable)
          Logs a Throwable.
 void log(int severity, java.lang.String option, int messageNum, java.lang.Object caller, java.lang.String method, org.eclipse.core.runtime.IStatus status)
          Logs a Status.
 void log(int severity, java.lang.String option, int messageNum, java.lang.Object caller, java.lang.String method, java.lang.Object object)
          Logs an Object.
 void log(int severity, java.lang.String option, int messageNum, java.lang.Object caller, java.lang.String method, java.lang.Throwable throwable)
          Logs a Throwable.
 

Field Detail

OK

static final int OK
This constant indicates that a logging message is Ok.

See Also:
Constant Field Values

INFO

static final int INFO
This constant indicates that a logging message is informational.

See Also:
Constant Field Values

WARNING

static final int WARNING
This constant indicates that a logging message is warning.

See Also:
Constant Field Values

ERROR

static final int ERROR
This constant indicates that a logging message is an error.

See Also:
Constant Field Values
Method Detail

isEnabled

boolean isEnabled()
Returns true if logging is enabled. There is no requirement to call this method before attempting a call to one of the log methods, as they will quietly do nothing if logging is disabled. This method can be useful, however, anywhere the cost of building up the parameters to a log method might be high and best avoided except when logging is enabled.

Returns:
True if logging is enabled, and false otherwise.

isEnabled

boolean isEnabled(java.lang.String option)
Returns true if this debug option is set to true.

Parameters:
option - this debug option string.
Returns:
returns true if this debug option is set to true.

log

void log(int severity,
         int messageNum,
         java.lang.Object caller,
         java.lang.String method,
         java.lang.Throwable throwable)
Logs a Throwable.

Parameters:
severity - The severity of the logging entry.
messageNum - The message number.
caller - The object (for non-static methods) or class (for static methods) doing the logging.
method - The simple name of the method doing the loging.
throwable - The Throwable to log.

log

void log(int severity,
         java.lang.String option,
         int messageNum,
         java.lang.Object caller,
         java.lang.String method,
         java.lang.Throwable throwable)
Logs a Throwable.

Parameters:
severity - The severity of the logging entry.
option - this debug option string.
messageNum - The message number.
caller - The object (for non-static methods) or class (for static methods) doing the logging.
method - The simple name of the method doing the loging.
throwable - The Throwable to log.

log

void log(int severity,
         int messageNum,
         java.lang.Object caller,
         java.lang.String method,
         org.eclipse.core.runtime.IStatus status)
Logs a Status.

Parameters:
severity - The severity of the logging entry.
messageNum - The message number.
caller - The object (for non-static methods) or class (for static methods) doing the logging.
method - The simple name of the method doing the loging.
status - The Status to log.

log

void log(int severity,
         java.lang.String option,
         int messageNum,
         java.lang.Object caller,
         java.lang.String method,
         org.eclipse.core.runtime.IStatus status)
Logs a Status.

Parameters:
severity - The severity of the logging entry.
option - this debug option string.
messageNum - The message number.
caller - The object (for non-static methods) or class (for static methods) doing the logging.
method - The simple name of the method doing the loging.
status - The Status to log.

log

void log(int severity,
         int messageNum,
         java.lang.Object caller,
         java.lang.String method,
         java.lang.Object object)
Logs an Object.

Parameters:
severity - The severity of the logging entry.
messageNum - The message number.
caller - The object (for non-static methods) or class (for static methods) doing the logging.
method - The simple name of the method doing the loging.
object - The Object to log.

log

void log(int severity,
         java.lang.String option,
         int messageNum,
         java.lang.Object caller,
         java.lang.String method,
         java.lang.Object object)
Logs an Object.

Parameters:
severity - The severity of the logging entry.
option - this debug option string.
messageNum - The message number.
caller - The object (for non-static methods) or class (for static methods) doing the logging.
method - The simple name of the method doing the loging.
object - The Object to log.