## org.eclipse.datatools.connectivity.oda.util.logging
Class FileHandler

    java.lang.Object
      org.eclipse.datatools.connectivity.oda.util.logging.Handler
          org.eclipse.datatools.connectivity.oda.util.logging.StreamHandler
              org.eclipse.datatools.connectivity.oda.util.logging.FileHandler

    public class FileHandler

extends StreamHandler

The `FileHandler` is a file logging `Handler` that publishes `LogRecords` to a specified file.

Constructor Summary
`FileHandler(java.lang.String filename)` Creates a `FileHandler` to publish `LogRecords` to the specified file.
`FileHandler(java.lang.String filename, LogFormatter formatter)` Creates a `FileHandler` to publish `LogRecords` to the sepcified file using the specified `LogFormatter`.

Method Summary
`void` `close()` Closes the current file handler.
`void` `publish(LogRecord record)` Creates the log file and its applicable parent directories when called for the first time.

Methods inherited from class org.eclipse.datatools.connectivity.oda.util.logging.StreamHandler
`flush, isLoggable, setFormatter`

Methods inherited from class org.eclipse.datatools.connectivity.oda.util.logging.Handler
`getFilter, getFormatter, getLevel, getLoggingErrorHandler, setFilter, setLevel, setLoggingErrorHandler`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileHandler

    public FileHandler(java.lang.String filename)

  Creates a `FileHandler` to publish `LogRecords` to the specified file. This will use the default `SimpleFormatter` to format the `LogRecords`. This does not create the physical file or the parent directories until publish() is called.

  Parameters:
    `filename` - the file to publish `LogRecords` to.

### FileHandler

    public FileHandler(java.lang.String filename,
                       LogFormatter formatter)

  Creates a `FileHandler` to publish `LogRecords` to the sepcified file using the specified `LogFormatter`. This does not create the physical file or the parent directories until publish() is called.

  Parameters:
    `filename` - the file to publish `LogRecords` to.
    `formatter` - the `LogFormatter` to format the `LogRecords`.

Method Detail

### publish

    public void publish(LogRecord record)

  Creates the log file and its applicable parent directories when called for the first time.

  Overrides:
    `publish` in class `StreamHandler`
  Parameters:
    `record` - the record to publish.

### close

    public void close()

  Closes the current file handler.

  Overrides:
    `close` in class `StreamHandler`