org.eclipse.ohf.bridge
Class BridgeTransactionAwareLog4jAppender

java.lang.Object
  extended by DailyRollingFileAppender
      extended by org.eclipse.ohf.bridge.BridgeTransactionAwareLog4jAppender

public class BridgeTransactionAwareLog4jAppender
extends DailyRollingFileAppender

This log4j appender is aware of the OHF Bridge transactions and can print messages that are aware of the transaction and session context. The Apender will create different log files for each session grouping them in folders related to the RHIOs they reffer to.


Field Summary
static BridgeTransactionAwareLog4jAppender INSTANT
           
 
Constructor Summary
BridgeTransactionAwareLog4jAppender()
          The default constructor does nothing.
BridgeTransactionAwareLog4jAppender(Layout layout, java.lang.String filename, java.lang.String datePattern)
          Instantiate a DailyRollingFileAppender and open the file designated by filename.
 
Method Summary
 void activateOptions()
           
 void append(LoggingEvent pLoggingEvent)
           
 void clearFilters()
           
 void close()
           
 void doAppend(LoggingEvent pEvent)
           
 void finalize()
           
 java.io.BufferedReader getMyLog()
           
 void setAppend(boolean pFlag)
           
 void setBufferedIO(boolean pBufferedIO)
           
 void setBufferSize(int pBufferSize)
           
 void setDatePattern(java.lang.String pattern)
           
 void setEncoding(java.lang.String pValue)
           
 void setErrorHandler(ErrorHandler pEh)
           
 void setFile(java.lang.String rootDirName)
           
 void setFile(java.lang.String rootDirName, boolean append, boolean bufferedIO, int bufferSize)
           Sets and opens the root directory where the logs output will go.
 void setImmediateFlush(boolean pValue)
           
 void setLayout(Layout pLayout)
           
 void setName(java.lang.String pName)
           
protected  void setQWForFiles(java.io.Writer writer)
          this method should not be called This method is overriden by DailyRollingFileAppender.
 void setThreshold(Priority pThreshold)
           
 void setWriter(java.io.Writer pWriter)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANT

public static BridgeTransactionAwareLog4jAppender INSTANT
Constructor Detail

BridgeTransactionAwareLog4jAppender

public BridgeTransactionAwareLog4jAppender()
The default constructor does nothing.


BridgeTransactionAwareLog4jAppender

public BridgeTransactionAwareLog4jAppender(Layout layout,
                                           java.lang.String filename,
                                           java.lang.String datePattern)
                                    throws java.io.IOException
Instantiate a DailyRollingFileAppender and open the file designated by filename. The opened filename will become the ouput destination for this appender.

Throws:
java.io.IOException
Method Detail

setFile

public void setFile(java.lang.String rootDirName,
                    boolean append,
                    boolean bufferedIO,
                    int bufferSize)
             throws java.io.IOException

Sets and opens the root directory where the logs output will go. The specified directory must be writable.

Do not use this method directly. To configure a FileAppender or one of its subclasses, set its properties one by one and then call activateOptions.

Parameters:
rootDirName - The path to the log file.
append - If true will append to rootDirName. Otherwise will truncate rootDirName.
Throws:
java.io.IOException

setFile

public void setFile(java.lang.String rootDirName)

append

public void append(LoggingEvent pLoggingEvent)

getMyLog

public java.io.BufferedReader getMyLog()
                                throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

activateOptions

public void activateOptions()

setDatePattern

public void setDatePattern(java.lang.String pattern)

setAppend

public void setAppend(boolean pFlag)

setBufferedIO

public void setBufferedIO(boolean pBufferedIO)

setBufferSize

public void setBufferSize(int pBufferSize)

setQWForFiles

protected void setQWForFiles(java.io.Writer writer)
this method should not be called This method is overriden by DailyRollingFileAppender.


close

public void close()

setEncoding

public void setEncoding(java.lang.String pValue)

setErrorHandler

public void setErrorHandler(ErrorHandler pEh)

setImmediateFlush

public void setImmediateFlush(boolean pValue)

setWriter

public void setWriter(java.io.Writer pWriter)

clearFilters

public void clearFilters()

doAppend

public void doAppend(LoggingEvent pEvent)

finalize

public void finalize()

setLayout

public void setLayout(Layout pLayout)

setName

public void setName(java.lang.String pName)

setThreshold

public void setThreshold(Priority pThreshold)