org.apache.wsrp4j.log
Interface Logger

All Known Implementing Classes:
LoggerImpl

public interface Logger

Logger defines the methods which are used to create logging messages.

Logging levels are:

ERROR
A serious failure in the execution of the application
WARN
An abnormal condition has been detected. The user may have to take action, but the running code is able to handle this condition without ultimately failing.
INFO
A condition that is worth noting but that does not require the user to perform an action.
TRACE_LOW
A low-detail trace message.
TRACE_MEDIUM
A medium-detail trace message.
TRACE_HIGH
A high-detail trace message.

Plain-text messages can be logged through the text(...) methods. These messages are generally hard-coded into the application.
These methods should only be used for logging trace data.

In addition, the following specialized methods are available to log trace information. Each of these trace methods is a convenience to the application programmer:

entry
Logs entry into a method.
exit
Logs exit from a method.
stackTrace
Logs the call stack.

For performance reasons the method isLogging(int logLevel) should be used to check if a given logging level is written at all to the output. The method should be used for the log message level entries, but is absolutely required to be called for trace messages to avoid unnecessary round-trips and object creation.


Field Summary
static int ERROR
          Defines an error message.
Use this type to inform the user of a serious failure in the execution of the application.
static int INFO
          Defines an informational message.
Use this type to indicate conditions that are worth noting but that do not require a user to take any precautions or perform an action.
static int TRACE_HIGH
          Defines a high-detail trace message.
static int TRACE_LOW
          Defines a low-detail trace message.
static int TRACE_MEDIUM
          Defines a medium-detail trace message.
static int WARN
          Defines a warning message.
Use this type to inform a user that an abnormal condition has been detected.
 
Method Summary
 void entry(int logLevel, java.lang.String loggingMethod)
          Logs entry into a method.
 void entry(int logLevel, java.lang.String loggingMethod, java.lang.Object parm1)
          Logs entry into a method.
 void entry(int logLevel, java.lang.String loggingMethod, java.lang.Object[] parms)
          Logs entry into a method.
 void exit(int logLevel, java.lang.String loggingMethod)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, boolean retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, byte retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, char retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, double retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, float retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, int retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, long retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, java.lang.Object retValue)
          Logs exit from a method.
 void exit(int logLevel, java.lang.String loggingMethod, short retValue)
          Logs exit from a method.
 boolean isLogging(int logLevel)
          Determines if this logger is logging data for a given log level or not.
 void stackTrace(int logLevel, java.lang.String loggingMethod, java.lang.String text)
          Logs the call stack.
 void text(int logLevel, java.lang.String loggingMethod, java.lang.String text)
          Logs a text message with no parameters.
 void text(int logLevel, java.lang.String loggingMethod, java.lang.String text, java.lang.Object parm1)
          Logs a text message with one parameter.
 void text(int logLevel, java.lang.String loggingMethod, java.lang.String text, java.lang.Object[] parms)
          Logs a text message with an array of parameters.
 void text(int logLevel, java.lang.String loggingMethod, java.lang.Throwable t, java.lang.String text)
          Logs a text message with no parameters.
 void text(int logLevel, java.lang.String loggingMethod, java.lang.Throwable t, java.lang.String text, java.lang.Object[] parms)
          Logs a text message with an array of parameters.
 

Field Detail

ERROR

public static final int ERROR
Defines an error message.
Use this type to inform the user of a serious failure in the execution of the application.

See Also:
Constant Field Values

WARN

public static final int WARN
Defines a warning message.
Use this type to inform a user that an abnormal condition has been detected. The user may have to take action, but the running code is able to handle this condition without ultimately failing.
A warning message is less severe than an error message.

See Also:
Constant Field Values

INFO

public static final int INFO
Defines an informational message.
Use this type to indicate conditions that are worth noting but that do not require a user to take any precautions or perform an action. Do not use this log level for repeating events.
An informational message is less severe than a warning message.

See Also:
Constant Field Values

TRACE_LOW

public static final int TRACE_LOW
Defines a low-detail trace message.

See Also:
Constant Field Values

TRACE_MEDIUM

public static final int TRACE_MEDIUM
Defines a medium-detail trace message.

See Also:
Constant Field Values

TRACE_HIGH

public static final int TRACE_HIGH
Defines a high-detail trace message.

See Also:
Constant Field Values
Method Detail

isLogging

public boolean isLogging(int logLevel)
Determines if this logger is logging data for a given log level or not.

Parameters:
logLevel - The log level to be checked.
Returns:
true when the object is logging the log level; false otherwise.

text

public void text(int logLevel,
                 java.lang.String loggingMethod,
                 java.lang.String text)
Logs a text message with no parameters.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
text - The message text.

text

public void text(int logLevel,
                 java.lang.String loggingMethod,
                 java.lang.String text,
                 java.lang.Object parm1)
Logs a text message with one parameter.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
text - The message text.
parm1 - An element to be displayed with the message.

text

public void text(int logLevel,
                 java.lang.String loggingMethod,
                 java.lang.String text,
                 java.lang.Object[] parms)
Logs a text message with an array of parameters.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
text - The message text.
parms - An array of elements to be displayed with the message.

text

public void text(int logLevel,
                 java.lang.String loggingMethod,
                 java.lang.Throwable t,
                 java.lang.String text)
Logs a text message with no parameters.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
t - The throwable that is cause for this log entry.
text - The message text.

text

public void text(int logLevel,
                 java.lang.String loggingMethod,
                 java.lang.Throwable t,
                 java.lang.String text,
                 java.lang.Object[] parms)
Logs a text message with an array of parameters.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
t - The throwable that is cause for this log entry.
text - The message text.
parms - An array of elements to be displayed with the message.

entry

public void entry(int logLevel,
                  java.lang.String loggingMethod)
Logs entry into a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.

entry

public void entry(int logLevel,
                  java.lang.String loggingMethod,
                  java.lang.Object parm1)
Logs entry into a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
parm1 - An element to be displayed as trace data.

entry

public void entry(int logLevel,
                  java.lang.String loggingMethod,
                  java.lang.Object[] parms)
Logs entry into a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
parms - An array of parameters passed to the method.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 byte retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 short retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 int retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 long retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 float retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 double retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 char retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 boolean retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

exit

public void exit(int logLevel,
                 java.lang.String loggingMethod,
                 java.lang.Object retValue)
Logs exit from a method.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
retValue - The returned value.

stackTrace

public void stackTrace(int logLevel,
                       java.lang.String loggingMethod,
                       java.lang.String text)
Logs the call stack.

Parameters:
logLevel - The level of the log entry.
loggingMethod - The name of the logging method.
text - The message text.