|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.beasys.commerce.util.Logger
Logger singleton. This class will read the log class from the commerce properties. This class must implement the Log interface. If it is not found or If there is a problem creating the specified log class, it will use the std err log. For purely convenience reasons, this class has implemented the Log interface and delegates to the instantiated 'Log'. So instead of doing Logger.getInstance().getLog().log(), you can do Logger.getInstance().log(). NOTE: Both methods are valid and write to identical logs. Also since the singleton implements the Log interface, the constants are available off of Logger, e.g. Logger.LOG_DEBUG == Log.LOG_DEBUG.
| Fields inherited from interface com.beasys.commerce.util.Log |
LOG_DEBUG, LOG_DEPRECATED, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_SECURITY, LOG_WARNING |
| Constructor Summary | |
protected |
Logger()
Default constructor. |
| Method Summary | |
void |
debug(java.lang.String aMsg)
Convenience method for debug level message (LOG_DEBUG). |
void |
deprecated(java.lang.String aMsg)
Show a deprecated message. |
static Logger |
getInstance()
Get singleton instance. |
Log |
getLog()
Return the instantiated 'Log'. |
int |
getMinimumLevel()
Get the minimum message output level. |
boolean |
getShowDebug()
Get show debug. |
boolean |
getShowDeprecated()
Get show deprecated. |
void |
info(java.lang.String aMsg)
Write to the logs, with extra information added. |
void |
info(java.lang.String aMsg,
java.lang.Throwable anException)
Write to the logs, with extra information added. |
protected void |
init()
Initialize the logger. |
void |
log(int aLevel,
java.lang.String aMsg)
Write to the weblogic logs, with extra information added. |
void |
log(int aLevel,
java.lang.String appName,
java.lang.String aMsg)
Write to the logs, with extra information added. |
void |
log(int aLevel,
java.lang.String appName,
java.lang.String aMsg,
java.lang.Throwable anException)
Write to the logs, with extra information added. |
void |
log(int aLevel,
java.lang.String aMsg,
java.lang.Throwable anException)
Write to the weblogic logs, with extra information added. |
void |
setMinimumLevel(int aLevel)
Set the minimum message output level. |
void |
setShowDebug(boolean aBool)
Set show debug. |
void |
setShowDeprecated(boolean aBool)
Set show deprecated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected Logger()
| Method Detail |
protected void init()
public static Logger getInstance()
Logpublic Log getLog()
Logpublic void debug(java.lang.String aMsg)
debug in interface LogaMsg - public void info(java.lang.String aMsg)
info in interface LogString - the message, if null it should be ignored.public void deprecated(java.lang.String aMsg)
deprecated in interface LogaMsg -
public void info(java.lang.String aMsg,
java.lang.Throwable anException)
info in interface LogString - the message, if null it should be ignored.anException -
public void log(int aLevel,
java.lang.String aMsg)
log in interface Logint - aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITYString - the message, if null it should be ignored.
public void log(int aLevel,
java.lang.String aMsg,
java.lang.Throwable anException)
log in interface Logint - aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITYString - the message, if null it should be ignored.Throwable - the exception.
public void log(int aLevel,
java.lang.String appName,
java.lang.String aMsg)
log in interface Logint - aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITYappName - the name of the application logging the messageString - the message, if null it should be ignored.
public void log(int aLevel,
java.lang.String appName,
java.lang.String aMsg,
java.lang.Throwable anException)
log in interface Logint - aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITYappName - the name of the application logging the messageString - the message, if null it should be ignored.Throwable - the exception.public void setMinimumLevel(int aLevel)
setMinimumLevel in interface LogaLevel - - this must conform to one of
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITYpublic int getMinimumLevel()
getMinimumLevel in interface Logint - this must conform to one of
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITYpublic void setShowDeprecated(boolean aBool)
setShowDeprecated in interface LogaBool - public boolean getShowDeprecated()
getShowDeprecated in interface Logbooleanpublic void setShowDebug(boolean aBool)
setShowDebug in interface LogaBool - public boolean getShowDebug()
getShowDebug in interface Logboolean
|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||