Package org.bgerp.util
Class Log
java.lang.Object
org.bgerp.util.Log
- Direct Known Subclasses:
- Log
Logging wrapper around Log4j version 1 with additional functions from version 2.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedLog(org.apache.log4j.Logger logger) Make private later, temporary protected for backward compatible inherited class.
- 
Method SummaryModifier and TypeMethodDescriptionvoidExecuteslog(Priority, String, Object...)withLevel.DEBUGvoidExecuteslog(Priority, String, Object...)withLevel.ERROR.voidLogs error message and stack trace.voidLogs error message fromeand stack trace.static StringFormats message using pattern with substitutions.static LoggetLog()UsingStackLocatorUtilgets the caller's object and logger for its class.static LogClass connected logger.voidExecuteslog(Priority, String, Object...)withLevel.INFO.booleanfinal voidWraps function toLogger.voidExecuteslog(Priority, String, Object...)withLevel.TRACEvoidExecuteslog(Priority, String, Object...)withLevel.WARN.voidSpecial warn call for deprecation messages.voidwarndClass(Class<?> deprecatedClass, Class<?> actualClass) Deprecation warning for a created class instancevoidDeprecation warning for a JSP callvoidwarndMethod(String deprecatedName) Deprecation warning for a called methodvoidwarndMethod(String deprecatedName, String actualName) Deprecation warning for a called method
- 
Field Details- 
MSG_DEPRECATED_METHOD_WAS_CALLED- See Also:
 
- 
MSG_WS_CREATE_NEW_INSTANCE_INSTEAD- See Also:
 
 
- 
- 
Constructor Details- 
Logprotected Log(org.apache.log4j.Logger logger) Make private later, temporary protected for backward compatible inherited class.
 
- 
- 
Method Details- 
getLogClass connected logger.- Parameters:
- clazz- the class.
- Returns:
- logger configured for clazz
 
- 
getLogUsingStackLocatorUtilgets the caller's object and logger for its class.- Returns:
- logger configured for the caller object's class.
 
- 
formatFormats message using pattern with substitutions.- Parameters:
- message- format using- FormattedMessage, supports both- {}and- %ssubstitutions.
- args- parameters for replacements in- message.
- Returns:
 
- 
traceExecuteslog(Priority, String, Object...)withLevel.TRACE
- 
debugExecuteslog(Priority, String, Object...)withLevel.DEBUG
- 
isDebugEnabledpublic boolean isDebugEnabled()- Returns:
- is Level.DEBUGenabled.
 
- 
infoExecuteslog(Priority, String, Object...)withLevel.INFO.
- 
warnExecuteslog(Priority, String, Object...)withLevel.WARN.
- 
warndSpecial warn call for deprecation messages.- Parameters:
- message- the message text pattern.
- args-
 
- 
warndMethodDeprecation warning for a called method- Parameters:
- deprecatedName- the deprecated method name
- actualName- the actual method name or- nullif no such exists
 
- 
warndMethodDeprecation warning for a called method- Parameters:
- deprecatedName- the deprecated method name
 
- 
warndClassDeprecation warning for a created class instance- Parameters:
- deprecatedClass- the deprecated class
- actualClass- the actual ones
 
- 
warndJspDeprecation warning for a JSP call- Parameters:
- deprecatedName- the deprecated call string
- actualName- the actual call string
 
- 
errorExecuteslog(Priority, String, Object...)withLevel.ERROR.
- 
errorLogs error message fromeand stack trace.- Parameters:
- e- the exception.
 
- 
errorLogs error message and stack trace.- Parameters:
- message- message text.
- e- exception.
 
- 
logWraps function toLogger.- Parameters:
- level-
- message-
 
 
-