org.apache.activemq.transport
Interface LogWriter

All Known Implementing Classes:
CustomLogWriter, DefaultLogWriter

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
 void initialMessage(org.slf4j.Logger log)
          Writes a header message to the log.
 void logAsyncRequest(org.slf4j.Logger log, java.lang.Object command)
          Writes a message to a log when an asynchronous equest command is sent.
 void logOneWay(org.slf4j.Logger log, java.lang.Object command)
          Writes a message to a log when message is sent.
 void logReceivedCommand(org.slf4j.Logger log, java.lang.Object command)
          Writes a message to a log when message is received.
 void logReceivedException(org.slf4j.Logger log, java.io.IOException error)
          Writes a message to a log when an exception is received.
 void logRequest(org.slf4j.Logger log, java.lang.Object command)
          Writes a message to a log when a request command is sent.
 void logResponse(org.slf4j.Logger log, java.lang.Object response)
          Writes a message to a log when a response command is received.
 

Method Detail

initialMessage

void initialMessage(org.slf4j.Logger log)
Writes a header message to the log.

Parameters:
log - The log to be written to.

logRequest

void logRequest(org.slf4j.Logger log,
                java.lang.Object command)
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

void logResponse(org.slf4j.Logger log,
                 java.lang.Object response)
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

void logAsyncRequest(org.slf4j.Logger log,
                     java.lang.Object command)
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

void logOneWay(org.slf4j.Logger log,
               java.lang.Object command)
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

void logReceivedCommand(org.slf4j.Logger log,
                        java.lang.Object command)
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

void logReceivedException(org.slf4j.Logger log,
                          java.io.IOException error)
Writes a message to a log when an exception is received.

Parameters:
log - The log to be written to.
command - The command to be logged.


Copyright © 2005-2012. All Rights Reserved.