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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLog(org.apache.log4j.Logger logger) Make private later, temporary protected for backward compatible inherited class. -
Method Summary
Modifier 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
-
Log
protected Log(org.apache.log4j.Logger logger) Make private later, temporary protected for backward compatible inherited class.
-
-
Method Details
-
getLog
-
getLog
UsingStackLocatorUtilgets the caller's object and logger for its class.- Returns:
- logger configured for the caller object's class.
-
format
-
trace
-
debug
-
isDebugEnabled
public boolean isDebugEnabled()- Returns:
- is
Level.DEBUGenabled.
-
info
-
warn
-
warnd
-
warndMethod
-
warndMethod
Deprecation warning for a called method- Parameters:
deprecatedName- the deprecated method name
-
warndClass
-
warndJsp
-
error
-
error
Logs error message fromeand stack trace.- Parameters:
e- the exception.
-
error
-
log
Wraps function toLogger.- Parameters:
level-message-
-