|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.essbase.eas.framework.defs.logger.Logger
public class Logger
This class defines the facilities and methods that a logging mechanism provides. The default level and location of logging can be set by the environment variables EAS_LOG_LEVEL and EAS_LOG_LOCATION. The EAS_LOG_LEVEL value should be an integer in the range 0-9999; if it isn't a valid integer, the default value WARNING will be used; if it is < 0, then 0 (NONE) will be used; if it is > 9999 (EVERYTHING), then logging will be set to EVERYTHING. The EAS_LOG_LOCATION value should be the name of a writable file. If it isn't then the logging location will be set to the default value of System.out.
Field Summary | |
---|---|
protected static java.lang.String |
API_ENTRY_TEXT |
protected static java.lang.String |
API_EXIT_TEXT |
static int |
CRITICAL CRITICAL indicates that critical level logging should take place. |
static int |
ERROR ERROR indicates that error level logging should take place. |
static int |
EVERYTHING EVERYTHING indicates that all logging should take place. |
static int |
EXCEPTION EXCEPTION indicates that exception level logging should take place. |
static int |
INFO INFO indicates that info level logging should take place. |
static int |
NONE NONE indicates that no logging should take place. |
protected static Logger |
theLogger The single logger being used by the application. |
static int |
TRACE TRACE indicates that trace level logging should take place. |
static int |
WARNING WARNING indicates that warning level logging should take place. |
static int |
XML_TRACE XML_TRACE indicates that XML trace level logging should take place. |
Constructor Summary | |
---|---|
protected |
Logger() Constructs a Logger object with default values. |
Method Summary | |
---|---|
java.lang.String |
getEASConsoleLogFile() Only for Console logger. |
int |
getEASLevel() Returns the current user logging level integer value (EAS level value) |
static Logger |
getLogger() Returns the single logger. |
static java.util.logging.Level |
getODLLevel(int easLevel) |
void |
log(int level, java.lang.Object[] messages) Writes a series of messages to the logging stream, if the logger is set to the proper level. |
void |
log(int level, java.lang.String message) Writes a message to the logging stream, if the logger is set to the proper level. |
void |
log(int level, java.lang.String[] messages) Writes a series of messages to the logging stream, if the logger is set to the proper level. |
void |
log(int level, java.lang.String messageKey, java.lang.Object[] params) |
void |
log(int easLevel, java.lang.String msgKey, java.lang.Object[] msgParams, java.lang.Throwable t) Writes an exception message to the logging stream, if the logger is set to the proper level. |
void |
log(int level, java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] params) |
void |
log(int easLevel, java.lang.String resourceBundleName, java.lang.String msgKey, java.lang.Object[] msgParams, java.lang.Object supplDetail) Writes an exception message to the logging stream, if the logger is set to the proper level. |
void |
log(int easLevel, java.lang.Throwable t) Writes an exception message to the logging stream, if the logger is set to the proper level. |
void |
log(java.lang.String message) Writes a message to the logging stream, if the logger is set to the proper level. |
void |
log(java.lang.Throwable t) Writes an exception message to the logging stream, if the logger is set to the proper level. |
protected void |
logAPI(java.lang.String tag, java.lang.String apiMessage, java.lang.Object[] messages) Writes a set of messages for an API function to the logging stream |
void |
logAPIEntry(java.lang.String functionName, java.util.List paramList) Log entry to an API function with a list of objects that were passed to the API call |
void |
logAPIEntry(java.lang.String functionName, java.lang.String paramString) Log entry into an API function |
void |
logAPIExit(java.lang.String functionName, int status) Log exit from an API function with no return values |
void |
logAPIExit(java.lang.String functionName, int status, java.util.List returnList) Log exit from an API function with a list of objects that were created from the API call |
void |
logAPIExit(java.lang.String functionName, int status, java.lang.String returnedResults) Log exit from an API function with a string representing the return values |
void |
logAPIExit(java.lang.String functionName, int status, java.lang.String[] returnedResults) Log exit from an API function with strings representing the return values |
void |
logEntry(java.lang.String className, java.lang.String methodName) Log entry into a method |
boolean |
logEntry(java.lang.String className, java.lang.String methodName, java.lang.Object[] params) Log entry into a method with parameters |
void |
logExit(java.lang.String className, java.lang.String methodName) Log exit from a method |
void |
logExit(java.lang.String className, java.lang.String methodName, java.lang.Object result) Log exit from a method with a result object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int CRITICAL
public static final int ERROR
public static final int WARNING
public static final int EXCEPTION
public static final int INFO
public static final int TRACE
public static final int XML_TRACE
public static final int EVERYTHING
protected static final java.lang.String API_ENTRY_TEXT
protected static final java.lang.String API_EXIT_TEXT
protected static final Logger theLogger
Constructor Detail |
---|
protected Logger()
Logger
object with default values. The logging level will be set to EXCEPTION.Method Detail |
---|
public static Logger getLogger()
public static java.util.logging.Level getODLLevel(int easLevel)
public int getEASLevel()
public java.lang.String getEASConsoleLogFile()
protected void logAPI(java.lang.String tag, java.lang.String apiMessage, java.lang.Object[] messages)
tag
- the tag for the messageapiMessage
- the api name that these log message are formessages
- the array of message to push to the logpublic void log(int level, java.lang.String message)
System.out
.level
- the level of the message we are loggingmessages
- an array of strings to logpublic void log(java.lang.String message)
System.out
.messages
- an array of strings to logpublic void log(int level, java.lang.Object[] messages)
System.out
.level
- the level of the message we are loggingmessages
- an array of strings to logpublic void log(int level, java.lang.String[] messages)
System.out
.level
- the level of the message we are loggingmessages
- an array of strings to logpublic void log(int level, java.lang.String messageKey, java.lang.Object[] params)
public void log(int level, java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] params)
public void logEntry(java.lang.String className, java.lang.String methodName)
className
- the name of the classmethodName
- the method of the classpublic boolean logEntry(java.lang.String className, java.lang.String methodName, java.lang.Object[] params)
className
- the name of the classmethodName
- the method of the classparams
- parameters to the methodtrue
if the message was written, false otherwisepublic void logExit(java.lang.String className, java.lang.String methodName)
className
- the name of the classmethodName
- the method of the classpublic void logExit(java.lang.String className, java.lang.String methodName, java.lang.Object result)
className
- the name of the classmethodName
- the method of the classresult
- the object that is the result of the methodpublic void logAPIEntry(java.lang.String functionName, java.lang.String paramString)
functionName
- the function we calledparamString
- string representing the parameterspublic void logAPIEntry(java.lang.String functionName, java.util.List paramList)
functionName
- the function namestatus
- the exit statusreturnList
- list of strings or objects returned from the API functionpublic void logAPIExit(java.lang.String functionName, int status)
functionName
- the function calledstatus
- the return status from the functionpublic void logAPIExit(java.lang.String functionName, int status, java.lang.String returnedResults)
functionName
-status
-returnedResults
-public void logAPIExit(java.lang.String functionName, int status, java.lang.String[] returnedResults)
functionName
-status
-returnedResults
-public void logAPIExit(java.lang.String functionName, int status, java.util.List returnList)
functionName
- the function namestatus
- the exit statusreturnList
- list of strings or objects returned from the API functionpublic void log(java.lang.Throwable t)
System.out
.t
- the throwable ("exception") object to log.public void log(int easLevel, java.lang.Throwable t)
System.out
.easLevel
- logger levelt
- Exception to be loggedpublic void log(int easLevel, java.lang.String msgKey, java.lang.Object[] msgParams, java.lang.Throwable t)
System.out
.easLevel
- logger levelmsgKey
- Message key in logger.propertiesmsgParams
- Parameters for the messaget
- Exception to be loggedpublic void log(int easLevel, java.lang.String resourceBundleName, java.lang.String msgKey, java.lang.Object[] msgParams, java.lang.Object supplDetail)
System.out
.easLevel
- logger levelresourceBundleName
- Resource bundle name where msgId is available.msgKey
- Message key in logger.propertiesmsgParams
- Parameters for the messagesupplDetails
- Additional detail about the message. If the object is a throwable, the the stack trace will be written to the message, otherwise, the toString() method will be use to convert the object to a String value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |