Module org.hsqldb
Package org.hsqldb.lib

## Class SimpleLog

- java.lang.Object
- - org.hsqldb.lib.SimpleLog

-     public class SimpleLog
      extends java.lang.Object

  Simple log for recording abnormal events in persistence

  Log levels, LOG_NONE, LOG_ERROR, and LOG_NORMAL are currently supported.

  LOG_ERROR corresponds to property value 1 and logs main database events plus any major errors encountered in operation. LOG_NORMAL corresponds to property value 2 and logs additional normal events and minor errors.

  Since:
    1.8.0
  Author:
    Fred Toussi (fredt@users dot sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `LOG_DETAIL` |
    `static int` | `LOG_ERROR` |
    `static int` | `LOG_NONE` |
    `static int` | `LOG_NORMAL` |
    `static int` | `LOG_SQL_BASIC` |
    `static int` | `LOG_SQL_DETAIL` |
    `static int` | `LOG_SQL_NORMAL` |
    `static int` | `LOG_SQL_RESULT` |
    `static int` | `LOG_WARNING` |
    `static java.lang.String` | `logTypeName` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SimpleLog​(java.lang.String path, int level, boolean isSQL)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |
    `void` | `flush()` |
    `int` | `getLevel()` |
    `java.io.PrintWriter` | `getPrintWriter()` |
    `void` | `logContext​(int atLevel, java.lang.String message)` |
    `void` | `logContext​(int atLevel, java.lang.String prefix, java.lang.String message, java.lang.String suffix)` |
    `void` | `logContext​(java.lang.Throwable t, java.lang.String message, int atLevel)` |
    `void` | `setLevel​(int level)` |

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

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

- - ### Field Detail

    - #### LOG_NONE

          public static final int LOG_NONE

      See Also:
        Constant Field Values

    - #### LOG_ERROR

          public static final int LOG_ERROR

      See Also:
        Constant Field Values

    - #### LOG_WARNING

          public static final int LOG_WARNING

      See Also:
        Constant Field Values

    - #### LOG_NORMAL

          public static final int LOG_NORMAL

      See Also:
        Constant Field Values

    - #### LOG_DETAIL

          public static final int LOG_DETAIL

      See Also:
        Constant Field Values

    - #### LOG_SQL_BASIC

          public static final int LOG_SQL_BASIC

      See Also:
        Constant Field Values

    - #### LOG_SQL_NORMAL

          public static final int LOG_SQL_NORMAL

      See Also:
        Constant Field Values

    - #### LOG_SQL_DETAIL

          public static final int LOG_SQL_DETAIL

      See Also:
        Constant Field Values

    - #### LOG_SQL_RESULT

          public static final int LOG_SQL_RESULT

      See Also:
        Constant Field Values

    - #### logTypeName

          public static final java.lang.String logTypeName

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SimpleLog

          public SimpleLog​(java.lang.String path,
                           int level,
                           boolean isSQL)

  - ### Method Detail

    - #### getLevel

          public int getLevel()

    - #### setLevel

          public void setLevel​(int level)

    - #### getPrintWriter

          public java.io.PrintWriter getPrintWriter()

    - #### logContext

          public void logContext​(int atLevel,
                                 java.lang.String message)

    - #### logContext

          public void logContext​(int atLevel,
                                 java.lang.String prefix,
                                 java.lang.String message,
                                 java.lang.String suffix)

    - #### logContext

          public void logContext​(java.lang.Throwable t,
                                 java.lang.String message,
                                 int atLevel)

    - #### flush

          public void flush()

    - #### close

          public void close()