|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sap.ip.me.api.services.Log
The logging class of the Mobile Engine framework. Every message that should be logged depending on the log level has to use this class.
Field Summary |
Fields inherited from interface com.sap.ip.me.api.services.LogSeverities |
ALL_LEVEL, DEBUG_LEVEL, DEVELOP_LEVEL, ERROR_LEVEL, EVENT_LEVEL, FATAL_LEVEL, INFO_LEVEL, PATH_LEVEL, STEP_LEVEL, WARNING_LEVEL |
Constructor Summary | |
Log()
|
Method Summary | |
static int |
getCurrentTracelevel()
Gets the current trace level. |
static boolean |
isLogging(int severity)
Returns true iff the given log severity will be logged. |
static boolean |
isSwitchedOn()
Returns true iff logging is enabled. |
static void |
log(int severity,
java.lang.String message)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(int severity,
java.lang.String message,
java.lang.Object param)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(int severity,
java.lang.String message,
java.lang.Object[] params)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(int severity,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(int severity,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(java.lang.String message)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(java.lang.String message,
java.lang.Object param1)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(java.lang.String message,
java.lang.Object[] params)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(java.lang.String message,
java.lang.Object param1,
java.lang.Object param2)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
log(java.lang.String message,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
Logs the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(int severity,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t,
boolean printStackTrace)
Logs an Exception with a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(int severity,
java.lang.String message,
java.lang.Throwable t,
boolean printStackTrace)
Logs an Exception with a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(int severity,
java.lang.Throwable t)
Logs an Exception without a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(int severity,
java.lang.Throwable t,
boolean printStackTrace)
Logs an Exception without a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(java.lang.String message,
java.lang.Throwable t,
boolean printStackTrace)
Logs an Exception with a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(java.lang.Throwable t)
Logs an Exception without a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logException(java.lang.Throwable t,
boolean printStackTrace)
Logs an Exception without a the message into the log file if log is switched on and the severity is less or equal the current trace level. |
static void |
logFileContent(int traceLevel,
java.io.File file)
Logs the content of a file into the log file if log is switched on and the trace level is less or equal the current trace level. |
static java.util.Enumeration |
read()
Reads the trace file and returns an String - Enumeration of
the log file lines. |
static void |
refresh()
Do not use this method.This method is used be the framework only. |
static void |
reset()
Deletes the old log file. |
static void |
setCurrentTracelevel(int newTracelevel)
Sets the current trace level. |
static void |
switchOff()
Turns of the log. |
static void |
switchOn()
Switches the log on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Log()
Method Detail |
public static final void logFileContent(int traceLevel, java.io.File file)
traceLevel
- The severity for this message.file
- The file that has to be logged.public static void setCurrentTracelevel(int newTracelevel)
newTracelevel
- The new current trace level.public static int getCurrentTracelevel()
public static boolean isLogging(int severity)
true
iff the given log severity will be logged.
severity
- The log severity that has to be checked.
true
iff the given log severity will be
logged.public static boolean isSwitchedOn()
true
iff logging is enabled.
true
iff logging is enabled.public static void switchOn()
public static void switchOff()
public static void reset()
public static void log(int severity, java.lang.String message)
severity
- The severity for this message.message
- The message that has to be logged.public static void log(int severity, java.lang.String message, java.lang.Object param)
severity
- The severity for this message.message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.param
- The parameter for the message. See java.text.MessageFormat
.Description of the Method
public static void log(int severity, java.lang.String message, java.lang.Object param1, java.lang.Object param2)
severity
- The severity for this message.message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.param1
- The first parameter for the message. See java.text.MessageFormat
.param2
- The second parameter list for the message. See java.text.MessageFormat
.Description of the Method
public static void log(int severity, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
severity
- The severity for this message.message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.param1
- The first parameter for the message. See java.text.MessageFormat
.param2
- The second parameter for the message. See java.text.MessageFormat
.param3
- The third parameter for the message. See java.text.MessageFormat
.Description of the Method
public static void log(int severity, java.lang.String message, java.lang.Object[] params)
severity
- The severity for this message.message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.params
- The parameter list for the message. See java.text.MessageFormat
.Description of the Method
public static void log(java.lang.String message)
INFO_LEVEL
.
message
- The message that has to be logged.public static void log(java.lang.String message, java.lang.Object param1)
INFO_LEVEL
.
message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.param1
- The first parameter for the message. See java.text.MessageFormat
.Description of the Method
public static void log(java.lang.String message, java.lang.Object param1, java.lang.Object param2)
INFO_LEVEL
.
message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.param1
- The first parameter for the message. See java.text.MessageFormat
.param2
- The second parameter for the message. See java.text.MessageFormat
.Description of the Method
public static void log(java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
INFO_LEVEL
.
message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.param1
- The first parameter for the message. See java.text.MessageFormat
.param2
- The second parameter for the message. See java.text.MessageFormat
.param3
- The third parameter for the message. See java.text.MessageFormat
.Description of the Method
public static void log(java.lang.String message, java.lang.Object[] params)
INFO_LEVEL
.
message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.params
- The parameter list for the message. See java.text.MessageFormat
.Description of the Method
public static void logException(int severity, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t, boolean printStackTrace)
true
- Parameters:
severity
- The severity for this message.message
- The message that has to be logged. See java.text.MessageFormat
for the format of this string.params
- The parameter list for the message. See java.text.MessageFormat
.t
- The Throwable that has to be logged.printStackTrace
- Description of the Parameter- See Also:
Description of the Method
public static void logException(int severity, java.lang.String message, java.lang.Throwable t, boolean printStackTrace)
true
- Parameters:
severity
- The severity for this message.message
- The message that has to be logged.t
- The Throwable that has to be logged.printStackTrace
- Description of the Parameter
public static void logException(java.lang.String message, java.lang.Throwable t, boolean printStackTrace)
trueERROR_LEVEL
.
message
- The message that has to be logged.t
- The Throwable that has to be logged.printStackTrace
- Description of the Parameterpublic static void logException(int severity, java.lang.Throwable t)
severity
- The severity for this message.t
- The Throwable that has to be logged.public static void logException(int severity, java.lang.Throwable t, boolean printStackTrace)
true
- Parameters:
severity
- The severity for this message.t
- The Throwable that has to be logged.printStackTrace
- Description of the Parameter
public static void logException(java.lang.Throwable t)
ERROR_LEVEL
.
t
- The Throwable that has to be logged.public static void logException(java.lang.Throwable t, boolean printStackTrace)
trueERROR_LEVEL
.
t
- The Throwable that has to be logged.printStackTrace
- Description of the Parameterpublic static java.util.Enumeration read()
Enumeration
of
the log file lines. Returns null
if the trace file is empty
or if there are any exceptions while reading the trace file.
Enumeration
of the log file lines. Returns
empty enumeration if the trace file is empty or if there are any
exceptions while reading the trace file.public static void refresh()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |