|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
com.jfw.util.JFWLogger
public final class JFWLogger
Used as gateway of Log4j.
Using the methods of this class for the log permits:
UpdateObservable. The log applet is
an observer of this class (through LogViewerObserver)
and is notificated every time a new log message is avalaible. To add an
observer method addObserver(java.lang.Object, java.lang.String, java.lang.String) must be used.
| Method Summary | |
|---|---|
void |
addObserver(java.lang.Object observer,
java.lang.String className,
java.lang.String description)
Add an observer. |
static void |
debug(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String debugMessage)
Write a debug message. |
void |
deleteObserver(java.lang.Object observer,
java.lang.String className)
Remove an observer. |
static void |
error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.Exception e)
Write an error message. |
static void |
error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String errorMessage)
Write an error message. |
static void |
error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String errorMessage,
java.lang.Exception e)
Write an error message. |
static void |
error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String errorMessage,
java.lang.Throwable t)
Write an error message. |
static void |
error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.Throwable t)
Write an error message. |
static JFWLogger |
getInstance()
Get attribute instance. |
boolean |
getIsDebug()
Get attribute IS_DEBUG. |
boolean |
getIsError()
Get attribute IS_ERROR. |
boolean |
getIsInfo()
Get attribute IS_INFO. |
boolean |
getIsProfile()
Get attribute IS_PROFILE. |
boolean |
getIsWarning()
Get attribute IS_WARNING. |
static void |
info(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String infoMessage)
Write an info message. |
static boolean |
isDebug()
Get attribute IS_DEBUG. |
static boolean |
isError()
Get attribute IS_ERROR. |
static boolean |
isInfo()
Get attribute IS_INFO. |
static boolean |
isProfile()
Get attribute IS_PROFILE. |
static boolean |
isWarning()
Get attribute IS_WARNING. |
static void |
profile(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
long profileTime)
Write a profiling message. |
void |
setIsDebug(boolean status)
Set attribute IS_DEBUG. |
void |
setIsError(boolean status)
Set attribute IS_ERROR. |
void |
setIsInfo(boolean status)
Set attribute IS_INFO. |
void |
setIsProfile(boolean status)
Set attribute IS_PROFILE. |
void |
setIsWarning(boolean status)
Set attribute IS_WARNING. |
static java.lang.String |
stackTrace(java.lang.Exception e)
Get the stack trace from a Throwable object. |
static java.lang.String |
stackTrace(java.lang.Throwable t)
Get the stack trace from a Throwable object. |
void |
update(java.util.Observable observable,
java.lang.Object obj)
Observer of class UpdateObservable. |
static void |
warning(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String warningMessage)
Write a warn message. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JFWLogger getInstance()
instance.
instance.public static boolean isDebug()
IS_DEBUG.
IS_DEBUG.public static boolean isProfile()
IS_PROFILE.
IS_PROFILE.public static boolean isInfo()
IS_INFO.
IS_INFO.public static boolean isWarning()
IS_WARNING.
IS_WARNING.public static boolean isError()
IS_ERROR.
IS_ERROR.
public static void error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String errorMessage)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.errorMessage - the error message to log.
public static void error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String errorMessage,
java.lang.Throwable t)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.errorMessage - the error message to log.t - an Throwable objest used for get the stack trace.
public static void error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.Throwable t)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.t - an Throwable objest used for get the stack trace.
public static void error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String errorMessage,
java.lang.Exception e)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.errorMessage - the error message to log.e - an Exception objest used for get the stack trace.
public static void error(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.Exception e)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.e - an Exception objest used for get the stack trace.
public static void debug(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String debugMessage)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.debugMessage - the debug message to log.
public static void info(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String infoMessage)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.infoMessage - the info message to log.
public static void warning(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
java.lang.String warningMessage)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.warningMessage - the warn message to log.
public static void profile(java.lang.String className,
java.lang.String methodName,
java.lang.String userId,
java.lang.String componentId,
long profileTime)
className - the name of the class writing the log message.methodName - the name of the method writing the log message.userId - a user id, if any, to associated with the log message.componentId - a component id, if any, to associated writing the log message.profileTime - the profiling message to log.public static java.lang.String stackTrace(java.lang.Throwable t)
public static java.lang.String stackTrace(java.lang.Exception e)
public void update(java.util.Observable observable,
java.lang.Object obj)
UpdateObservable.
Call method {#link #initialize}.
update in interface java.util.Observerobservable - the observable object.obj - an update object.
public void addObserver(java.lang.Object observer,
java.lang.String className,
java.lang.String description)
observers.
observer - an Observer instance.className - the class name of the observer.description - a description of the observer.
public void deleteObserver(java.lang.Object observer,
java.lang.String className)
observers.
observer - an Observer instance.className - the class name of the observer.public boolean getIsDebug()
IS_DEBUG.
IS_DEBUG.public void setIsDebug(boolean status)
IS_DEBUG.
status - value for IS_DEBUG.public boolean getIsInfo()
IS_INFO.
IS_INFO.public void setIsInfo(boolean status)
IS_INFO.
status - value for IS_INFO.public boolean getIsWarning()
IS_WARNING.
IS_WARNING.public void setIsWarning(boolean status)
IS_WARNING.
status - value for IS_WARNING.public boolean getIsProfile()
IS_PROFILE.
IS_PROFILE.public void setIsProfile(boolean status)
IS_PROFILE.
status - value for IS_PROFILE.public boolean getIsError()
IS_ERROR.
IS_ERROR.public void setIsError(boolean status)
IS_ERROR.
status - value for IS_ERROR.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||