net.i2p.util

## Class FileLogWriter

- java.lang.Object
- - net.i2p.util.LogWriter
  - - net.i2p.util.FileLogWriter

- All Implemented Interfaces:
    Runnable

      class FileLogWriter
      extends LogWriter

  File-based log writer thread that pulls log records from the LogManager, writes them to the current logfile, and rotates the logs as necessary.

- - ### Field Summary

    - ### Fields inherited from class net.i2p.util.LogWriter

      `_manager, _write, FLUSH_INTERVAL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileLogWriter(LogManager manager)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `closeWriter()`
    `String` | `currentFile()` File may not exist or have old logs in it if not opened yet
    `protected void` | `flushWriter()`
    `protected void` | `writeRecord(int priority, String val)` Write a single String verbatim to the writer.
    `protected void` | `writeRecord(LogRecord rec, String formatted)` Write the provided LogRecord to the writer.

    - ### Methods inherited from class net.i2p.util.LogWriter

      `flushRecords, flushRecords, run, setFlushInterval, stopWriting`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileLogWriter

          public FileLogWriter(LogManager manager)

  - ### Method Detail

    - #### closeWriter

          protected void closeWriter()

      Specified by:
        `closeWriter` in class `LogWriter`

    - #### currentFile

          public String currentFile()

      File may not exist or have old logs in it if not opened yet
      Specified by:
        `currentFile` in class `LogWriter`
      Returns:
        non-null

    - #### flushWriter

          protected void flushWriter()

      Specified by:
        `flushWriter` in class `LogWriter`

    - #### writeRecord

          protected void writeRecord(int priority,
                                     String val)

      Description copied from class: `LogWriter`
      Write a single String verbatim to the writer.
      Specified by:
        `writeRecord` in class `LogWriter`
      Parameters:
        `priority` - the level to log the line at.
        `val` - the String to write.

    - #### writeRecord

          protected void writeRecord(LogRecord rec,
                                     String formatted)

      Description copied from class: `LogWriter`
      Write the provided LogRecord to the writer.
      Specified by:
        `writeRecord` in class `LogWriter`
      Parameters:
        `rec` - the LogRecord to write.
        `formatted` - a String pre-formatted from rec, may be ignored.