edu.northwestern.at.morphadorner

## Class MorphAdornerLogger

- java.lang.Object
- - edu.northwestern.at.morphadorner.MorphAdornerLogger

- All Implemented Interfaces:
    java.io.Serializable

      public class MorphAdornerLogger
      extends java.lang.Object
      implements java.io.Serializable

  MorphAdorner log manager.

  This class wraps a singleton instance of a `BaseLogger` for the class "edu.northwestern.at.morphadorner".

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Logger` | `logger` The wrapped logger.
    `protected MorphAdornerSettings` | `morphAdornerSettings` MorphAdorner settings.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MorphAdornerLogger(java.lang.String configFileName, java.lang.String logFileDirectory, MorphAdornerSettings morphAdornerSettings)` Create a logger.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Logger` | `createWrappedLogger(java.lang.String configFileName, java.lang.String logFileDirectory)` Create the wrapped logger.
    `Logger` | `getLogger()` Get the wrapped logger.
    `void` | `logDebug(java.lang.String str)` Logs Debug message.
    `void` | `logError(java.lang.String str)` Logs error message.
    `void` | `logInfo(java.lang.String str)` Logs Info message.
    `void` | `println(java.lang.String formatString)` Print a string to log file.
    `void` | `println(java.lang.String formatString, java.lang.Object[] objects)` Print formatted elements to log file.
    `void` | `println(java.lang.String formatString, java.lang.String value)` Print a string to log file.
    `void` | `setLogger(Logger logger)` Set the wrapped logger.
    `void` | `terminate()` Terminates the logger.

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

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

- - ### Field Detail

    - #### logger

          protected Logger logger

      The wrapped logger.

    - #### morphAdornerSettings

          protected MorphAdornerSettings morphAdornerSettings

      MorphAdorner settings.

  - ### Constructor Detail

    - #### MorphAdornerLogger

          public MorphAdornerLogger(java.lang.String configFileName,
                            java.lang.String logFileDirectory,
                            MorphAdornerSettings morphAdornerSettings)
                             throws java.io.FileNotFoundException,
                                    java.io.IOException

      Create a logger.
      Parameters:
        `configFileName` - Log configuration file name.
        `logFileDirectory` - Directory into which to write log.

        Reads the log configuration file and configures the logger.

      Throws:
        `java.lang.Exception`
        `java.io.FileNotFoundException`
        `java.io.IOException`

  - ### Method Detail

    - #### terminate

          public void terminate()

      Terminates the logger.

    - #### createWrappedLogger

          public Logger createWrappedLogger(java.lang.String configFileName,
                                   java.lang.String logFileDirectory)

      Create the wrapped logger.
      Parameters:
        `logFileDirectory` -
        `configFileName` -

        If the log file directory or config file name is null, a dummy logger which generates no output is created.

    - #### logDebug

          public void logDebug(java.lang.String str)

      Logs Debug message.
      Parameters:
        `str` - Log message.

    - #### logInfo

          public void logInfo(java.lang.String str)

      Logs Info message.
      Parameters:
        `str` - Log message.

    - #### logError

          public void logError(java.lang.String str)

      Logs error message.
      Parameters:
        `str` - Log message.

    - #### getLogger

          public Logger getLogger()

      Get the wrapped logger.
      Returns:
        The wrapped logger.

    - #### setLogger

          public void setLogger(Logger logger)

      Set the wrapped logger.
      Parameters:
        `logger` - The logger to set.

    - #### println

          public void println(java.lang.String formatString)

      Print a string to log file.
      Parameters:
        `formatString` - Resource string name to print.

    - #### println

          public void println(java.lang.String formatString,
                     java.lang.String value)

      Print a string to log file.
      Parameters:
        `formatString` - Resource string name to print.
        `value` - String to output in format fornatString

    - #### println

          public void println(java.lang.String formatString,
                     java.lang.Object[] objects)

      Print formatted elements to log file.
      Parameters:
        `formatString` - Format string name.
        `objects` - Objects to output in format fornatString