org.apache.jdo.tck.util
Class TCKFileHandler

java.lang.Object
  extended byjava.util.logging.Handler
      extended byorg.apache.jdo.tck.util.TCKFileHandler

public class TCKFileHandler
extends java.util.logging.Handler

A JDK1.4 logging Handler class which delegates to a file handler. Configuration: By default each TCKFileHandler is initialized using the following LogManager configuration properties:

For details on the construction of the file name see method BatchTestRunner.changeFileName(String).


Constructor Summary
TCKFileHandler()
           
 
Method Summary
 void close()
           
 void flush()
           
 java.lang.String getEncoding()
           
 java.util.logging.ErrorManager getErrorManager()
           
 java.util.logging.Filter getFilter()
           
 java.util.logging.Formatter getFormatter()
           
 java.util.logging.Level getLevel()
           
 boolean isLoggable(java.util.logging.LogRecord record)
           
 void publish(java.util.logging.LogRecord record)
           
protected  void reportError(java.lang.String msg, java.lang.Exception ex, int code)
           
protected  void setAppend(boolean append)
          Sets the append property.
protected  void setDelegate(org.apache.jdo.tck.util.TCKFileHandler.FileHandlerDelegate delegate)
          Sets the delegate.
 void setEncoding(java.lang.String encoding)
          Sets the encoding property.
 void setErrorManager(java.util.logging.ErrorManager em)
           
 void setFilter(java.util.logging.Filter filter)
          Sets the filter property.
 void setFormatter(java.util.logging.Formatter formatter)
          Sets the formatter property.
 void setLevel(java.util.logging.Level level)
          Sets the level property.
protected  void setPattern(java.lang.String fileName)
          Sets the file name fileName property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCKFileHandler

public TCKFileHandler()
               throws java.io.IOException,
                      java.lang.SecurityException
Throws:
java.io.IOException
java.lang.SecurityException
See Also:
Handler.Handler()
Method Detail

publish

public void publish(java.util.logging.LogRecord record)
See Also:
Handler.publish(java.util.logging.LogRecord)

close

public void close()
           throws java.lang.SecurityException
Throws:
java.lang.SecurityException
See Also:
Handler.close()

flush

public void flush()
See Also:
Handler.flush()

getEncoding

public java.lang.String getEncoding()
See Also:
Handler.getEncoding()

getErrorManager

public java.util.logging.ErrorManager getErrorManager()
See Also:
Handler.getErrorManager()

getFilter

public java.util.logging.Filter getFilter()
See Also:
Handler.getFilter()

getFormatter

public java.util.logging.Formatter getFormatter()
See Also:
Handler.getFormatter()

getLevel

public java.util.logging.Level getLevel()
See Also:
Handler.getLevel()

reportError

protected void reportError(java.lang.String msg,
                           java.lang.Exception ex,
                           int code)
See Also:
Handler.reportError(java.lang.String, java.lang.Exception, int)

setErrorManager

public void setErrorManager(java.util.logging.ErrorManager em)
See Also:
Handler.setErrorManager(java.util.logging.ErrorManager)

isLoggable

public boolean isLoggable(java.util.logging.LogRecord record)
See Also:
StreamHandler.isLoggable(java.util.logging.LogRecord)

setPattern

protected void setPattern(java.lang.String fileName)
Sets the file name fileName property.

Parameters:
fileName - The fileName to set

setAppend

protected void setAppend(boolean append)
Sets the append property.

Parameters:
append - The append to set.

setLevel

public void setLevel(java.util.logging.Level level)
Sets the level property.

Parameters:
level - The level to set.

setFilter

public void setFilter(java.util.logging.Filter filter)
Sets the filter property.

Parameters:
filter - The filter to set.

setFormatter

public void setFormatter(java.util.logging.Formatter formatter)
Sets the formatter property.

Parameters:
formatter - The formatter to set.

setEncoding

public void setEncoding(java.lang.String encoding)
                 throws java.lang.SecurityException,
                        java.io.UnsupportedEncodingException
Sets the encoding property.

Parameters:
encoding - The encoding to set.
Throws:
java.io.UnsupportedEncodingException
java.lang.SecurityException

setDelegate

protected void setDelegate(org.apache.jdo.tck.util.TCKFileHandler.FileHandlerDelegate delegate)
Sets the delegate.

Parameters:
delegate - The delegate to set.


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.