public class MediatorLog extends Object implements SynapseLog
SynapseLog
interface appropriate
for usage in a mediator. Instances of this class should not be created
directly but by using the factory method
AbstractMediator.getLog(org.apache.synapse.MessageContext)
.
Note that this is work in progress. Please refer to https://issues.apache.org/jira/browse/SYNAPSE-374 for more information.
Constructor and Description |
---|
MediatorLog(org.apache.commons.logging.Log defaultLog,
boolean traceOn,
MessageContext synCtx) |
Modifier and Type | Method and Description |
---|---|
void |
auditDebug(Object msg)
Log a message at level DEBUG to all available/enabled logs.
|
void |
auditError(Object msg)
Log a message at level ERROR to all available/enabled logs.
|
void |
auditFatal(Object msg)
Log a message at level FATAL to all available/enabled logs.
|
void |
auditLog(Object msg)
Log a message at level INFO to all available/enabled logs.
|
void |
auditTrace(Object msg)
Log a message at level TRACE to all available/enabled logs.
|
void |
auditWarn(Object msg)
Log a message at level WARN to all available/enabled logs.
|
void |
error(Object msg)
Log a message at level ERROR to the default log and to the trace, if trace is enabled.
|
boolean |
isTraceOrDebugEnabled()
Check whether a call to
SynapseLog.traceOrDebug(Object) would actually cause a log
message to be written to the logs. |
boolean |
isTraceTraceEnabled()
Check whether a call to
SynapseLog.traceTrace(Object) would actually cause a log
message to be written to the logs. |
void |
logSynapseException(String msg,
Throwable cause)
Log a message at level ERROR to the default log, the service log and the trace, if trace
is enabled.
|
void |
traceOrDebug(Object msg)
Log a message to the default log at level DEBUG and and to the trace log
at level INFO if trace is enabled for the mediator.
|
void |
traceOrDebugWarn(Object msg)
Log a message at level WARN to the default log, if level DEBUG is enabled,
and to the trace log, if trace is enabled for the mediator.
|
void |
traceTrace(Object msg)
Log a message to the trace log at level TRACE if trace is enabled for the mediator.
|
public MediatorLog(org.apache.commons.logging.Log defaultLog, boolean traceOn, MessageContext synCtx)
public boolean isTraceOrDebugEnabled()
SynapseLog
SynapseLog.traceOrDebug(Object)
would actually cause a log
message to be written to the logs.isTraceOrDebugEnabled
in interface SynapseLog
true
if trace or debug is enabledpublic void traceOrDebug(Object msg)
traceOrDebug
in interface SynapseLog
msg
- the message to be loggedpublic void traceOrDebugWarn(Object msg)
traceOrDebugWarn
in interface SynapseLog
msg
- the message to be loggedpublic boolean isTraceTraceEnabled()
SynapseLog
SynapseLog.traceTrace(Object)
would actually cause a log
message to be written to the logs.isTraceTraceEnabled
in interface SynapseLog
true
if trace is enabled for the trace logpublic void traceTrace(Object msg)
traceTrace
in interface SynapseLog
msg
- the message to be loggedpublic void auditLog(Object msg)
auditLog
in interface SynapseLog
msg
- the message to be loggedpublic void auditDebug(Object msg)
auditDebug
in interface SynapseLog
msg
- the message to be loggedpublic void auditTrace(Object msg)
auditTrace
in interface SynapseLog
msg
- the message to be loggedpublic void auditWarn(Object msg)
auditWarn
in interface SynapseLog
msg
- the message to be loggedpublic void auditError(Object msg)
auditError
in interface SynapseLog
msg
- the message to be loggedpublic void auditFatal(Object msg)
auditFatal
in interface SynapseLog
msg
- the message to be loggedpublic void error(Object msg)
error
in interface SynapseLog
msg
- the message to be loggedpublic void logSynapseException(String msg, Throwable cause)
logSynapseException
in interface SynapseLog
msg
- the message of the exceptioncause
- the cause of the exceptionCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.