Package org.compiere.util
Class CLogger
java.lang.Object
java.util.logging.Logger
org.compiere.util.CLogger
iDempiere Logger
- Version:
- $Id: CLogger.java,v 1.3 2006/08/09 16:38:47 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Fields inherited from class java.util.logging.Logger
global, GLOBAL_LOGGER_NAME
-
Method Summary
Modifier and TypeMethodDescriptionstatic CLogger
get()
Get default iDempiere Logger.static CLogger
getCLogger
(Class<?> clazz) Get Loggerstatic CLogger
getCLogger
(String className) Get Loggerstatic CLogger
getCLogger
(String className, boolean usePackageLevel) Get Loggerstatic Throwable
Get root causestatic ValueNamePair
Get last error from environment contextstatic Exception
Get last exception from environment context.static void
Remove last Saved Messages/Errors/Info from environment contextstatic ValueNamePair
Get and remove last error from environment contextstatic String
retrieveErrorString
(String defaultMsg) Get and remove last error message from environment context.static Exception
Get and remove last exception from environment context.static ValueNamePair
Get and remove last Info from environment contextstatic ValueNamePair
Get and remove last Warning from environment contextstatic String
retrieveWarningString
(String defaultMsg) Get and remove last Warning message from environment context.boolean
Set and issue Error and save into context as ValueNamePair (LAST_EXCEPTION)boolean
Set and issue (if specified) Error and save as ValueNamePairboolean
Set and issue Error and save as ValueNamePairboolean
Create ValueNamePair(AD_Message, message) and save into environment context as last error.
Issue/publish AD_Message and message as severe log message if issueError is true.boolean
Save exception as environment context's last exception.boolean
Save exception as environment context's last exception.boolean
Create ValueNamePair(AD_Message, message) and save into environment context as last info.
Issue/publish AD_Message and message as info log messageboolean
saveWarning
(String AD_Message, String message) Create ValueNamePair(AD_Message, message) and save into environment context as last warning.
Issue/publish AD_Message and message as warning log messagetoString()
String RepresentationMethods inherited from class java.util.logging.Logger
addHandler, config, config, entering, entering, entering, exiting, exiting, fine, fine, finer, finer, finest, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getGlobal, getHandlers, getLevel, getLogger, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, info, isLoggable, log, log, log, log, log, log, log, logp, logp, logp, logp, logp, logp, logrb, logrb, logrb, logrb, logrb, logrb, logrb, logrb, removeHandler, setFilter, setLevel, setParent, setResourceBundle, setUseParentHandlers, severe, severe, throwing, warning, warning
-
Method Details
-
getCLogger
Get Logger- Parameters:
className
- class name- Returns:
- Logger
-
getCLogger
Get Logger- Parameters:
className
- class nameusePackageLevel
-- Returns:
- Logger
-
getCLogger
Get Logger- Parameters:
clazz
- class name- Returns:
- Logger
-
get
Get default iDempiere Logger.- Returns:
- logger
-
saveError
Set and issue Error and save as ValueNamePair- Parameters:
AD_Message
- message keymessage
- clear text message- Returns:
- true (to avoid removal of method)
-
saveError
Set and issue Error and save into context as ValueNamePair (LAST_EXCEPTION)- Parameters:
AD_Message
- message keyex
- exception- Returns:
- true (to avoid removal of method)
-
saveError
Set and issue (if specified) Error and save as ValueNamePair- Parameters:
AD_Message
- message keyex
- exceptionissueError
- if true will issue an error- Returns:
- true (to avoid removal of method)
-
saveError
Save exception as environment context's last exception.
Create ValueNamePair(AD_Message, message) and save into environment context as last error.
Issue/publish AD_Message and message as severe log message- Parameters:
AD_Message
- message keymessage
-ex
- exception- Returns:
- true (to avoid removal of method)
-
saveError
Save exception as environment context's last exception.
Create ValueNamePair(AD_Message, message) and save into environment context as last error.
Issue/publish AD_Message and message as severe log message if issueError is true.- Parameters:
AD_Message
- message keymessage
-ex
- exceptionissueError
- if true will issue an error- Returns:
- true (to avoid removal of method)
-
saveError
Create ValueNamePair(AD_Message, message) and save into environment context as last error.
Issue/publish AD_Message and message as severe log message if issueError is true.- Parameters:
AD_Message
- message keymessage
- clear text messageissueError
- print error message (default true)- Returns:
- true
-
retrieveError
Get and remove last error from environment context- Returns:
- AD_Message as Value and Message as String
-
peekError
Get last error from environment context- Returns:
- AD_Message as Value and Message as String
-
retrieveErrorString
Get and remove last error message from environment context.- Parameters:
defaultMsg
- default message (used when there are no errors on stack)- Returns:
- error message, or defaultMsg if there is no error message saved
- See Also:
-
retrieveException
Get and remove last exception from environment context.- Returns:
- last exception
-
peekException
Get last exception from environment context.- Returns:
- last exception
-
saveWarning
Create ValueNamePair(AD_Message, message) and save into environment context as last warning.
Issue/publish AD_Message and message as warning log message- Parameters:
AD_Message
- message keymessage
- clear text message- Returns:
- true
-
retrieveWarningString
Get and remove last Warning message from environment context.- Parameters:
defaultMsg
- default message (used when there are no warnings on stack)- Returns:
- error message, or defaultMsg if there is not error message saved
- See Also:
-
retrieveWarning
Get and remove last Warning from environment context- Returns:
- AD_Message as Value and Message as String
-
saveInfo
Create ValueNamePair(AD_Message, message) and save into environment context as last info.
Issue/publish AD_Message and message as info log message- Parameters:
AD_Message
- message keymessage
- clear text message- Returns:
- true
-
retrieveInfo
Get and remove last Info from environment context- Returns:
- AD_Message as Value and Message as String
-
resetLast
public static void resetLast()Remove last Saved Messages/Errors/Info from environment context -
getRootCause
Get root cause- Parameters:
t
-- Returns:
- Throwable
-
toString
String Representation
-