com.sap.mdm.logging
Class MdmLogger

java.lang.Object
  extended bycom.sap.mdm.logging.MdmLogger

public class MdmLogger
extends Object

MdmLogger is class that is intended for logging messages for specific class or component.

MdmLogger offers convenient methods for creating loggers and for logging messages with the different log levels. These methods are named after sap logger severity level names (like info, warning, error).

Since:
7.1.07

Field Summary
static int SAP_LOGGER_TYPE
          A constant for sap logger type
static int SUN_LOGGER_TYPE
          A constant for sun logger type
 
Method Summary
 boolean beDebug()
          Check if a message of severity Level.FINEST if SUN logger or Severity.DEBUG if SAP logger would actually be logged or traced by the logger.
 boolean beError()
          Check if a message of severity Level.SEVERE if SUN logger and Severity.ERROR if SAP logger would actually be logged or traced by the logger.
 boolean beFatal()
          Check if a message of severity Level.SEVERE if SUN logger and Severity.FATAL if SAP logger would actually be logged or traced by the logger.
 boolean beInfo()
          Check if a message of severity Level.INFO if SUN logger and Severity.INFO if SAP logger would actually be logged or traced by the logger.
 boolean bePath()
          Check if a message of severity Level.FINER in SUN logger or Severity.PATH in SAP logger would actually be logged or traced by the logger.
 boolean beWarning()
          Check if a message of severity Level.WARNING if SUN logger and Severity.WARNINIG if SAP logger would actually be logged or traced by the logger.
 void debug(String msg)
          Log a debug message.
 void debug(String msg, Object[] params)
          Log a debug message.
 void debug(String sourceMethod, String msg)
          Log a debug message.
 void debug(String sourceMethod, String msg, Object[] params, Throwable thrown)
          Log a debug message.
 void debug(String sourceMethod, String msg, Throwable thrown)
          Log a debug message.
 void debug(String msg, Throwable thrown)
          Log a debug message.
 void entering(String sourceMethod)
          Log a method entry.
 void entering(String sourceMethod, Object param)
          Log a method entry, with one parameter.
 void entering(String sourceMethod, Object[] params)
          Log a method entry, with an array of parameters.
 void entering(String sourceClass, String sourceMethod, Object param1)
          Deprecated. use entering(String sourceMethod, Object param1) Log a method entry, with an array of parameters.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

 void entering(String sourceClass, String sourceMethod, Object[] params)
          Deprecated. use entering(String sourceMethod, Object params[]) Log a method entry, with an array of parameters.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

 void error(String msg)
          Log a error message.
 void error(String msg, boolean traceOnly)
          Log a error message.
 void error(String msg, Object[] params)
          Log a error message.
 void error(String msg, Object[] params, boolean traceOnly)
          Log a error message.
 void error(String sourceMethod, String msg)
          Log a error message.
 void error(String sourceMethod, String msg, boolean traceOnly)
          Log a error message.
 void error(String sourceMethod, String msg, Object[] params, Throwable thrown)
          Log a error message.
 void error(String sourceMethod, String msg, Object[] params, Throwable thrown, boolean traceOnly)
          Log a error message.
 void error(String sourceMethod, String msg, Throwable thrown)
          Log a error message.
 void error(String sourceMethod, String msg, Throwable thrown, boolean traceOnly)
          Log a error message.
 void error(String msg, Throwable thrown)
          Log a error message.
 void error(String msg, Throwable thrown, boolean traceOnly)
          Log a error message.
 void exiting(String sourceMethod)
          Log a method return.
 void exiting(String sourceMethod, Object result)
          Log a method return, with result object.
 void fatal(String msg)
          Log a error message.
 void fatal(String msg, boolean traceOnly)
          Log a error message.
 void fatal(String msg, Object[] params)
          Log a error message.
 void fatal(String msg, Object[] params, boolean traceOnly)
          Log a error message.
 void fatal(String sourceMethod, String msg)
          Log a error message.
 void fatal(String sourceMethod, String msg, boolean traceOnly)
          Log a error message.
 void fatal(String sourceMethod, String msg, Object[] params, Throwable thrown)
          Log a error message.
 void fatal(String sourceMethod, String msg, Object[] params, Throwable thrown, boolean traceOnly)
          Log a error message.
 void fatal(String sourceMethod, String msg, Throwable thrown)
          Log a error message.
 void fatal(String sourceMethod, String msg, Throwable thrown, boolean traceOnly)
          Log a error message.
 void fatal(String msg, Throwable thrown)
          Log a error message.
 void fatal(String msg, Throwable thrown, boolean traceOnly)
          Log a error message.
static Logger getJavaLogger(Class clazz)
          Returns the original instance of java.util.logging.Logger in order to expose the full functionality of Logger class.
static Logger getJavaLogger(String loggerName)
          Returns the original instance of java.util.logging.Logger in order to expose the full functionality of Logger class.
static MdmLogger getLogger(Class clazz)
          Create a logger for the specified class.
static MdmLogger getLogger(String name)
          Create a logger for a named subsystem.
static MdmLogger getSunLogger(Class clazz)
          Create a logger wrapping a standard SUN Java logger for the specified class.
static MdmLogger getSunLogger(String name)
          Create a logger wrapping a standard SUN Java logger for a named subsystem.
 int getType()
          Returns the type of logger.
 void info(String msg)
          Log a info message.
 void info(String msg, boolean traceOnly)
          Log a info message.
 void info(String msg, Object[] params)
          Log a info message.
 void info(String msg, Object[] params, boolean traceOnly)
          Log a info message.
 void info(String sourceMethod, String msg)
          Log a info message.
 void info(String sourceMethod, String msg, boolean traceOnly)
          Log a info message.
 void info(String sourceMethod, String msg, Object[] params, Throwable thrown)
          Log a info message.
 void info(String sourceMethod, String msg, Object[] params, Throwable thrown, boolean traceOnly)
          Log a info message.
 void info(String sourceMethod, String msg, Throwable thrown)
          Log a info message.
 void info(String sourceMethod, String msg, Throwable thrown, boolean traceOnly)
          Log a info message.
 void info(String msg, Throwable thrown)
          Log a info message and associated Throwable information.
 void info(String msg, Throwable thrown, boolean traceOnly)
          Log a info message and associated Throwable information.
 void path(String msg)
          Log a path message.
 void path(String msg, Object[] params)
          Log a path message.
 void path(String sourceMethod, String msg)
          Log a path message.
 void path(String sourceMethod, String msg, Object[] params, Throwable thrown)
          Log a path message.
 void path(String sourceMethod, String msg, Throwable thrown)
          Log a path message.
 void path(String msg, Throwable thrown)
          Log a path message.
 void warning(String msg)
          Log a warning message.
 void warning(String msg, boolean traceOnly)
          Log a warning message.
 void warning(String msg, Object[] params)
          Log a warning message.
 void warning(String msg, Object[] params, boolean traceOnly)
          Log a warning message.
 void warning(String sourceMethod, String msg)
          Log a warning message.
 void warning(String sourceMethod, String msg, boolean traceOnly)
          Log a warning message.
 void warning(String sourceMethod, String msg, Object[] params, Throwable thrown)
          Log a warning message.
 void warning(String sourceMethod, String msg, Object[] params, Throwable thrown, boolean traceOnly)
          Log a warning message.
 void warning(String sourceMethod, String msg, Throwable thrown)
          Log a warning message.
 void warning(String sourceMethod, String msg, Throwable thrown, boolean traceOnly)
          Log a warning message.
 void warning(String msg, Throwable thrown)
          Log a warning message with associated Throwable information.
 void warning(String msg, Throwable thrown, boolean traceOnly)
          Log a warning message with associated Throwable information.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUN_LOGGER_TYPE

public static final int SUN_LOGGER_TYPE
A constant for sun logger type

See Also:
Constant Field Values

SAP_LOGGER_TYPE

public static final int SAP_LOGGER_TYPE
A constant for sap logger type

See Also:
Constant Field Values
Method Detail

getLogger

public static MdmLogger getLogger(String name)
Create a logger for a named subsystem.

Parameters:
name - A name for the logger. This should be a dot-separated name and should normally be based on the package name or class name of the subsystem, such as java.net or javax.swing
Returns:
a suitable MdmLogger

getLogger

public static MdmLogger getLogger(Class clazz)
Create a logger for the specified class.

Parameters:
clazz - A class for the logger.
Returns:
a suitable MdmLogger

getSunLogger

public static MdmLogger getSunLogger(String name)
Create a logger wrapping a standard SUN Java logger for a named subsystem.

Parameters:
name - A name for the logger. This should be a dot-separated name and should normally be based on the package name or class name of the subsystem, such as java.net or javax.swing
Returns:
a suitable MdmLogger

getSunLogger

public static MdmLogger getSunLogger(Class clazz)
Create a logger wrapping a standard SUN Java logger for the specified class.

Parameters:
clazz - A class for the logger.
Returns:
a suitable MdmLogger

getJavaLogger

public static Logger getJavaLogger(String loggerName)
Returns the original instance of java.util.logging.Logger in order to expose the full functionality of Logger class.

Parameters:
loggerName - A name for the logger. This should be a dot-separated name and should normally be based on the package name or class name of the subsystem, such as java.net.Socket or javax.swing
Returns:
standard java logger

getJavaLogger

public static Logger getJavaLogger(Class clazz)
Returns the original instance of java.util.logging.Logger in order to expose the full functionality of Logger class.

Parameters:
clazz - A class for the logger.
Returns:
standard java logger

entering

public void entering(String sourceMethod)
Log a method entry.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - name of method that is being entered

entering

public void entering(String sourceMethod,
                     Object param)
Log a method entry, with one parameter.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - name of method that is being entered
param - parameter to the method being entered

entering

public void entering(String sourceMethod,
                     Object[] params)
Log a method entry, with an array of parameters.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - name of method that is being entered
params - array of parameters to the method being entered

entering

public void entering(String sourceClass,
                     String sourceMethod,
                     Object param1)
Deprecated. use entering(String sourceMethod, Object param1) Log a method entry, with an array of parameters.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceClass - name of class which method is being entered
sourceMethod - name of method that is being entered
param1 - parameter to the method being entered

entering

public void entering(String sourceClass,
                     String sourceMethod,
                     Object[] params)
Deprecated. use entering(String sourceMethod, Object params[]) Log a method entry, with an array of parameters.

This is a convenience method that can be used to log entry to a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceClass - name of class which method is being entered
sourceMethod - name of method that is being entered
params - array of parameters to the method being entered

exiting

public void exiting(String sourceMethod)
Log a method return.

This is a convenience method that can be used to log returning from a method.

Since every entering method should have matching exiting method it is recommended to use finally block for logging exiting from a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - name of the method

exiting

public void exiting(String sourceMethod,
                    Object result)
Log a method return, with result object.

This is a convenience method that can be used to log returning from a method.

Since every entering method should have matching exiting method it is recommended to use finally block for logging exiting from a method.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - name of the method
result - Object that is being returned

debug

public void debug(String msg)
Log a debug message.

Logs the message with severity Severity.DEBUG if SAP logger is used and with log severity Level.FINEST if SUN logger is used.

The logger should be enabled for the given severity in order to message to be forwarded to the logs/traces.

Parameters:
msg - The string message

debug

public void debug(String msg,
                  Object[] params)
Log a debug message.

Logs the message with severity Severity.DEBUG if SAP logger is used and with log severity Level.FINEST if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message

debug

public void debug(String msg,
                  Throwable thrown)
Log a debug message.

Logs the message with severity Severity.DEBUG if SAP logger is used and with log severity Level.FINEST if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.

debug

public void debug(String sourceMethod,
                  String msg,
                  Object[] params,
                  Throwable thrown)
Log a debug message.

Logs the message with severity Severity.DEBUG if SAP logger is used and with log severity Level.FINEST if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.

debug

public void debug(String sourceMethod,
                  String msg,
                  Throwable thrown)
Log a debug message.

Logs the message with severity Severity.DEBUG if SAP logger is used and with log severity Level.FINEST if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.

debug

public void debug(String sourceMethod,
                  String msg)
Log a debug message.

Logs the message with severity Severity.DEBUG if SAP logger is used and with log severity Level.FINEST if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message

path

public void path(String msg)
Log a path message.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

The logger should be enabled for the given severity in order to message to be forwarded to the logs/traces.

Parameters:
msg - The string message

path

public void path(String msg,
                 Object[] params)
Log a path message.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message

path

public void path(String msg,
                 Throwable thrown)
Log a path message.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.

path

public void path(String sourceMethod,
                 String msg,
                 Object[] params,
                 Throwable thrown)
Log a path message.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.

path

public void path(String sourceMethod,
                 String msg,
                 Throwable thrown)
Log a path message.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.

path

public void path(String sourceMethod,
                 String msg)
Log a path message.

Logs the message with severity Severity.PATH if SAP logger is used and with log severity Level.FINER if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message

info

public void info(String msg)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
msg - The string message

info

public void info(String msg,
                 boolean traceOnly)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
msg - The string message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

info

public void info(String msg,
                 Object[] params)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
msg - The string message
params - array of parameters to the message

info

public void info(String msg,
                 Object[] params,
                 boolean traceOnly)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
msg - The string message
params - array of parameters to the message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

info

public void info(String msg,
                 Throwable thrown)
Log a info message and associated Throwable information.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.

info

public void info(String msg,
                 Throwable thrown,
                 boolean traceOnly)
Log a info message and associated Throwable information.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

info

public void info(String sourceMethod,
                 String msg,
                 Object[] params,
                 Throwable thrown)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.

info

public void info(String sourceMethod,
                 String msg,
                 Throwable thrown)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.

info

public void info(String sourceMethod,
                 String msg)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message

info

public void info(String sourceMethod,
                 String msg,
                 Object[] params,
                 Throwable thrown,
                 boolean traceOnly)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

info

public void info(String sourceMethod,
                 String msg,
                 Throwable thrown,
                 boolean traceOnly)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

info

public void info(String sourceMethod,
                 String msg,
                 boolean traceOnly)
Log a info message.

Logs the message with severity Severity.INFO if SAP logger is used and with log severity Level.INFO if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

warning

public void warning(String msg)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
msg - The string message

warning

public void warning(String msg,
                    boolean traceOnly)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
msg - The string message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

warning

public void warning(String msg,
                    Object[] params)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message

warning

public void warning(String msg,
                    Object[] params,
                    boolean traceOnly)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

warning

public void warning(String msg,
                    Throwable thrown)
Log a warning message with associated Throwable information.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.

warning

public void warning(String msg,
                    Throwable thrown,
                    boolean traceOnly)
Log a warning message with associated Throwable information.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

warning

public void warning(String sourceMethod,
                    String msg,
                    Object[] params,
                    Throwable thrown)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.

warning

public void warning(String sourceMethod,
                    String msg,
                    Throwable thrown)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.

warning

public void warning(String sourceMethod,
                    String msg)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message

warning

public void warning(String sourceMethod,
                    String msg,
                    Object[] params,
                    Throwable thrown,
                    boolean traceOnly)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

warning

public void warning(String sourceMethod,
                    String msg,
                    Throwable thrown,
                    boolean traceOnly)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

warning

public void warning(String sourceMethod,
                    String msg,
                    boolean traceOnly)
Log a warning message.

Logs the message with severity Severity.WARNING if SAP logger is used and with log severity Level.WARNING if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

error

public void error(String msg)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message logged into the trace and the log.

error

public void error(String msg,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message logged into the trace and the log.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

error

public void error(String msg,
                  Object[] params)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message

error

public void error(String msg,
                  Object[] params,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

error

public void error(String msg,
                  Throwable thrown)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.

error

public void error(String msg,
                  Throwable thrown,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

error

public void error(String sourceMethod,
                  String msg,
                  Object[] params,
                  Throwable thrown)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.

error

public void error(String sourceMethod,
                  String msg,
                  Throwable thrown)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.

error

public void error(String sourceMethod,
                  String msg)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message

error

public void error(String sourceMethod,
                  String msg,
                  Object[] params,
                  Throwable thrown,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

error

public void error(String sourceMethod,
                  String msg,
                  Throwable thrown,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

error

public void error(String sourceMethod,
                  String msg,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.ERROR if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

fatal

public void fatal(String msg)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message logged into the trace and the log.

fatal

public void fatal(String msg,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message logged into the trace and the log.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

fatal

public void fatal(String msg,
                  Object[] params)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message

fatal

public void fatal(String msg,
                  Object[] params,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
params - Array of parameters to the message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

fatal

public void fatal(String msg,
                  Throwable thrown)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.

fatal

public void fatal(String msg,
                  Throwable thrown,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

fatal

public void fatal(String sourceMethod,
                  String msg,
                  Object[] params,
                  Throwable thrown)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.

fatal

public void fatal(String sourceMethod,
                  String msg,
                  Throwable thrown)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.

fatal

public void fatal(String sourceMethod,
                  String msg)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message

fatal

public void fatal(String sourceMethod,
                  String msg,
                  Object[] params,
                  Throwable thrown,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
params - Array of parameters to the message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

fatal

public void fatal(String sourceMethod,
                  String msg,
                  Throwable thrown,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
thrown - Throwable associated with log message.
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

fatal

public void fatal(String sourceMethod,
                  String msg,
                  boolean traceOnly)
Log a error message.

Logs the message with severity Severity.FATAL if SAP logger is used and with log severity Level.SEVERE if SUN logger is used.

Parameters:
sourceMethod - Name of method that issued the logging request
msg - The string message
traceOnly - Does not apply for standard java logger. In case of SAP logger true value means the message should be logged into the predefined trace but not into the log, false value means the message should be logged into the trace and the log.

getType

public int getType()
Returns the type of logger.

Returns:
type of logger.

See Also:
SUN_LOGGER_TYPE, SAP_LOGGER_TYPE

beDebug

public boolean beDebug()
Check if a message of severity Level.FINEST if SUN logger or Severity.DEBUG if SAP logger would actually be logged or traced by the logger. This check is based on the Loggers effective level, which may be inherited from its parent.

Returns:
true if the message with the specified level would be logged.

bePath

public boolean bePath()
Check if a message of severity Level.FINER in SUN logger or Severity.PATH in SAP logger would actually be logged or traced by the logger. This check is based on the Loggers effective level, which may be inherited from its parent.

Returns:
true if the message with the specified level would be logged.

beInfo

public boolean beInfo()
Check if a message of severity Level.INFO if SUN logger and Severity.INFO if SAP logger would actually be logged or traced by the logger. This check is based on the Loggers effective level, which may be inherited from its parent.

Returns:
true if the message with the specified level would be logged.

beWarning

public boolean beWarning()
Check if a message of severity Level.WARNING if SUN logger and Severity.WARNINIG if SAP logger would actually be logged or traced by the logger. This check is based on the Loggers effective level, which may be inherited from its parent.

Returns:
true if the message with the specified level would be logged.

beError

public boolean beError()
Check if a message of severity Level.SEVERE if SUN logger and Severity.ERROR if SAP logger would actually be logged or traced by the logger. This check is based on the Loggers effective level, which may be inherited from its parent.

Returns:
true if the message with the specified level would be logged.

beFatal

public boolean beFatal()
Check if a message of severity Level.SEVERE if SUN logger and Severity.FATAL if SAP logger would actually be logged or traced by the logger. This check is based on the Loggers effective level, which may be inherited from its parent.

Returns:
true if the message with the specified level would be logged.


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.