org.apache.poi.util

## Interface POILogger

- All Known Implementing Classes:
    CommonsLogger, NullLogger, SystemOutLogger

      @Internal
      public interface POILogger

  A logger interface that strives to make it as easy as possible for developers to write log calls, while simultaneously making those calls as cheap as possible by performing lazy evaluation of the log message.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEBUG`
    `static int` | `ERROR`
    `static int` | `FATAL`
    `static int` | `INFO`
    `static int` | `WARN`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `_log(int level, java.lang.Object obj1)` Log a message - belongs to the SPI, usually not called from user code
    `void` | `_log(int level, java.lang.Object obj1, java.lang.Throwable exception)` Log a message - belongs to the SPI, usually not called from user code
    `boolean` | `check(int level)` Check if a logger is enabled to log at the specified level This allows code to avoid building strings or evaluating functions in the arguments to log.
    `void` | `initialize(java.lang.String cat)` Initialize the Logger - belongs to the SPI, called from the POILogFactory
    `default void` | `log(int level, java.lang.Object... objs)` Log a message.

- - ### Field Detail

    - #### DEBUG

          static final int DEBUG

      See Also:
        Constant Field Values

    - #### INFO

          static final int INFO

      See Also:
        Constant Field Values

    - #### WARN

          static final int WARN

      See Also:
        Constant Field Values

    - #### ERROR

          static final int ERROR

      See Also:
        Constant Field Values

    - #### FATAL

          static final int FATAL

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### initialize

          void initialize(java.lang.String cat)

      Initialize the Logger - belongs to the SPI, called from the POILogFactory
      Parameters:
        `cat` - the String that defines the log

    - #### _log

          @Internal
          void _log(int level,
                              java.lang.Object obj1)

      Log a message - belongs to the SPI, usually not called from user code
      Parameters:
        `level` - One of DEBUG, INFO, WARN, ERROR, FATAL
        `obj1` - The object to log. This is converted to a string.

    - #### _log

          @Internal
          void _log(int level,
                              java.lang.Object obj1,
                              java.lang.Throwable exception)

      Log a message - belongs to the SPI, usually not called from user code
      Parameters:
        `level` - One of DEBUG, INFO, WARN, ERROR, FATAL
        `obj1` - The object to log. This is converted to a string.
        `exception` - An exception to be logged

    - #### check

          boolean check(int level)

      Check if a logger is enabled to log at the specified level This allows code to avoid building strings or evaluating functions in the arguments to log. An example: `

           if (logger.check(POILogger.INFO)) {
               logger.log(POILogger.INFO, "Avoid concatenating " + " strings and evaluating " + functions());
           }

      `
      Parameters:
        `level` - One of DEBUG, INFO, WARN, ERROR, FATAL

    - #### log

          default void log(int level,
                           java.lang.Object... objs)

      Log a message. Lazily appends Object parameters together. If the last parameter is a `Throwable` it is logged specially.
      Parameters:
        `level` - One of DEBUG, INFO, WARN, ERROR, FATAL
        `objs` - the objects to place in the message

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.