Package org.wso2.carbon.utils.logging
Class CarbonAuditLog
java.lang.Object
org.wso2.carbon.utils.logging.CarbonAuditLog
- All Implemented Interfaces:
org.apache.commons.logging.Log
CarbonAuditLog is a wrapper implementation of the Log interface from Apache Commons Logging.
This class is used to provide a standardized way to log audit messages, with additional
context information appended to each log entry.
The class ensures to append MDC (Mapped Diagnostic Context) properties to each log message before passing it
to the underlying logger. The MDC properties allow you to add context-specific information to log messages.
In this implementation, impersonation details are appended to the log messages if available.
Usage:
- Instantiate the CarbonAuditLog class and use its methods to log messages.
- The class uses a static Log instance named AUDIT_LOG to log messages with the "AUDIT_LOG" name.
- MDC properties can be appended to log messages to include additional context information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidbooleanbooleanbooleanbooleanbooleanbooleanvoidvoidvoidvoid
-
Field Details
-
AUDIT_LOG
public static final org.apache.commons.logging.Log AUDIT_LOG
-
-
Constructor Details
-
CarbonAuditLog
public CarbonAuditLog()
-
-
Method Details
-
debug
- Specified by:
debugin interfaceorg.apache.commons.logging.Log
-
debug
- Specified by:
debugin interfaceorg.apache.commons.logging.Log
-
error
- Specified by:
errorin interfaceorg.apache.commons.logging.Log
-
error
- Specified by:
errorin interfaceorg.apache.commons.logging.Log
-
fatal
- Specified by:
fatalin interfaceorg.apache.commons.logging.Log
-
fatal
- Specified by:
fatalin interfaceorg.apache.commons.logging.Log
-
info
- Specified by:
infoin interfaceorg.apache.commons.logging.Log
-
info
- Specified by:
infoin interfaceorg.apache.commons.logging.Log
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabledin interfaceorg.apache.commons.logging.Log
-
isErrorEnabled
public boolean isErrorEnabled()- Specified by:
isErrorEnabledin interfaceorg.apache.commons.logging.Log
-
isFatalEnabled
public boolean isFatalEnabled()- Specified by:
isFatalEnabledin interfaceorg.apache.commons.logging.Log
-
isInfoEnabled
public boolean isInfoEnabled()- Specified by:
isInfoEnabledin interfaceorg.apache.commons.logging.Log
-
isTraceEnabled
public boolean isTraceEnabled()- Specified by:
isTraceEnabledin interfaceorg.apache.commons.logging.Log
-
isWarnEnabled
public boolean isWarnEnabled()- Specified by:
isWarnEnabledin interfaceorg.apache.commons.logging.Log
-
trace
- Specified by:
tracein interfaceorg.apache.commons.logging.Log
-
trace
- Specified by:
tracein interfaceorg.apache.commons.logging.Log
-
warn
- Specified by:
warnin interfaceorg.apache.commons.logging.Log
-
warn
- Specified by:
warnin interfaceorg.apache.commons.logging.Log
-