Logger Class
DEPRECATED Use the Weblogic logging mechanism
- public class Logger
extends Object
implements com.beasys.commerce.util.Log
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.
-
Hierarchy
-
Object
Logger
-
All Implemented Interfaces
-
com.beasys.commerce.util.Log
public void |
-
debug (String aMsg)
- Convenience method for debug level message (LOG_DEBUG).
|
public void |
-
deprecated (String aMsg)
- Show a deprecated message.
|
public static Logger |
-
getInstance ()
- Get singleton instance.
|
public Log |
-
getLog ()
- Return the instantiated 'Log'.
|
public int |
-
getMinimumLevel ()
- Get the minimum message output level.
|
public boolean |
-
getShowDebug ()
- Get show debug.
|
public boolean |
-
getShowDeprecated ()
- Get show deprecated.
|
public void |
-
info (String aMsg)
- Write to the logs, with extra information
added.
|
public void |
-
info (String aMsg, Throwable anException)
- Write to the logs, with extra information
added.
|
protected void |
-
init ()
- Initialize the logger.
|
public void |
-
log (int aLevel, String aMsg)
- Write to the weblogic logs, with extra information
added.
|
public void |
-
log (int aLevel, String aMsg, Throwable anException)
- Write to the weblogic logs, with extra information
added.
|
public void |
-
log (int aLevel, String appName, String aMsg)
- Write to the logs, with extra information
added.
|
public void |
-
log (int aLevel, String appName, String aMsg, Throwable anException)
- Write to the logs, with extra information
added.
|
public void |
-
setMinimumLevel (int aLevel)
- Set the minimum message output level.
|
public void |
-
setShowDebug (boolean aBool)
- Set show debug.
|
public void |
-
setShowDeprecated (boolean aBool)
- Set show deprecated.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods from interface com.beasys.commerce.util.com.beasys.commerce.util.Log |
debug , deprecated , getMinimumLevel , getShowDebug , getShowDeprecated , info , info , log , log , log , log , setMinimumLevel , setShowDebug , setShowDeprecated
|
Logger
protected Logger()
- Default constructor.
debug(String) Method
public void debug(String
aMsg)
Convenience method for debug level message (LOG_DEBUG).
deprecated(String) Method
public void deprecated(String
aMsg)
Show a deprecated message. This message should
also explain what they should use instead of
the current implementation.
getInstance() Method
public static Logger
getInstance()
Get singleton instance.
Returns
Log
getLog() Method
public Log
getLog()
Return the instantiated 'Log'.
Returns
Log
getMinimumLevel() Method
public int getMinimumLevel()
Get the minimum message output level.
Returns
int
- this must conform to one of
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITY
getShowDebug() Method
public boolean getShowDebug()
Get show debug.
Returns
boolean
getShowDeprecated() Method
public boolean getShowDeprecated()
Get show deprecated.
Returns
boolean
info(String) Method
public void info(String
aMsg)
Write to the logs, with extra information
added. Convenience method for LOG_INFO level.
Parameters
-
aMsg
- the message, if null it should be ignored.
info(String, Throwable) Method
public void info(String
aMsg,
Throwable
anException)
Write to the logs, with extra information
added. Convenience method for LOG_INFO level.
Parameters
-
aMsg
- the message, if null it should be ignored.
-
anException
-
init() Method
protected void init()
Initialize the logger.
log(int, String) Method
public void log(int aLevel,
String
aMsg)
Write to the weblogic logs, with extra information
added.
Parameters
-
aLevel
- aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITY
-
aMsg
- the message, if null it should be ignored.
log(int, String, Throwable) Method
public void log(int aLevel,
String
aMsg,
Throwable
anException)
Write to the weblogic logs, with extra information
added.
Parameters
-
aLevel
- aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITY
-
aMsg
- the message, if null it should be ignored.
-
anException
- the exception.
log(int, String, String) Method
public void log(int aLevel,
String
appName,
String
aMsg)
Write to the logs, with extra information
added.
Parameters
-
aLevel
- aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITY
-
appName
- the name of the application logging the message
-
aMsg
- the message, if null it should be ignored.
log(int, String, String, Throwable) Method
public void log(int aLevel,
String
appName,
String
aMsg,
Throwable
anException)
Write to the logs, with extra information
added.
Parameters
-
aLevel
- aLevel Possible error levels are:
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITY
-
appName
- the name of the application logging the message
-
aMsg
- the message, if null it should be ignored.
-
anException
- the exception.
setMinimumLevel(int) Method
public void setMinimumLevel(int aLevel)
Set the minimum message output level.
Parameters
-
aLevel
- - this must conform to one of
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_SECURITY
setShowDebug(boolean) Method
public void setShowDebug(boolean aBool)
Set show debug.
setShowDeprecated(boolean) Method
public void setShowDeprecated(boolean aBool)
Set show deprecated.