Package org.apache.activemq.transport
Interface LogWriter
public interface LogWriter
Interface for classes that will be called by the TransportLogger
class to actually write to a log file.
Every class that implements this interface has do be declared in
the resources/META-INF/services/org/apache/activemq/transport/logwriters
directory, by creating a file with the name of the writer (for example
"default") and including the line
class=org.apache.activemq.transport.logwriters.(Name of the LogWriter class)
- Author:
- David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialMessage
(org.slf4j.Logger log) Writes a header message to the log.void
logAsyncRequest
(org.slf4j.Logger log, Object command) Writes a message to a log when an asynchronous equest command is sent.void
Writes a message to a log when message is sent.void
logReceivedCommand
(org.slf4j.Logger log, Object command) Writes a message to a log when message is received.void
logReceivedException
(org.slf4j.Logger log, IOException error) Writes a message to a log when an exception is received.void
logRequest
(org.slf4j.Logger log, Object command) Writes a message to a log when a request command is sent.void
logResponse
(org.slf4j.Logger log, Object command) Writes a message to a log when a response command is received.void
prefix each statement with this value. allows connections to be correlated when logger is shared
-
Method Details
-
setPrefix
prefix each statement with this value. allows connections to be correlated when logger is shared- Parameters:
prefix
-
-
initialMessage
void initialMessage(org.slf4j.Logger log) Writes a header message to the log.- Parameters:
log
- The log to be written to.
-
logRequest
Writes a message to a log when a request command is sent.- Parameters:
log
- The log to be written to.command
- The command to be logged.
-
logResponse
Writes a message to a log when a response command is received.- Parameters:
log
- The log to be written to.command
- The command to be logged.
-
logAsyncRequest
Writes a message to a log when an asynchronous equest command is sent.- Parameters:
log
- The log to be written to.command
- The command to be logged.
-
logOneWay
Writes a message to a log when message is sent.- Parameters:
log
- The log to be written to.command
- The command to be logged.
-
logReceivedCommand
Writes a message to a log when message is received.- Parameters:
log
- The log to be written to.command
- The command to be logged.
-
logReceivedException
Writes a message to a log when an exception is received.- Parameters:
log
- The log to be written to.error
- The exception to be logged.
-