de.esprit.netsuite.server.log

## Class ServerLogChannel

- java.lang.Object
- - de.esprit.common.log.LogChannel
  - - de.esprit.netsuite.server.log.ServerLogChannel

- All Implemented Interfaces:
    LogLevelEvent.Source, LogMessageEvent.Source, LogSupport, ServerObject<ServerContext>, java.io.Closeable, java.lang.AutoCloseable

      public class ServerLogChannel
      extends LogChannel
      implements ServerObject<ServerContext>

  This class encapsulates the particularities of a server side LogChannel. It configures itself from the server startup parameters and maintains the cleanup feature by itself.
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.common.log.LogChannel

      `DEFAULT_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerLogChannel(ServerContext serverCtx)`
    `ServerLogChannel(ServerContext serverCtx, java.lang.String channelName, boolean isSubChannel)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cleanupLogFiles()` Removes obsolete log-files in all log directories according to the current server logging parameters.
    `java.io.File` | `getLogDir()`
    `ServerContext` | `getServerContext()` Returns the server runtime environment
    `boolean` | `isLogFileOpen()`
    `void` | `logFatal(java.lang.Object caller, java.lang.String message, java.lang.Exception e)` Overridden to send an email message to administrators
    `LogPrinterFile` | `openLogFile(boolean useLastLogfile)`

    - ### Methods inherited from class de.esprit.common.log.LogChannel

      `addLogLevelListener, addLogMessageListener, close, closeLogConsole, closeLogFile, closeLogFrame, getLogConsole, getLogFile, getLogFrame, getLogLevel, getName, hasLogPrinter, isClosed, isLogDebug, isLogVerbose, log, log, logDebug, logDump, logError, logError, logError, logInfo, logVerbose, logWarning, openLogConsole, openLogFile, openLogFile, openLogFile, openLogFrame, removeLogLevelListener, removeLogMessageListener, setLogLevel, toString`

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

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

- - ### Constructor Detail

    - #### ServerLogChannel

          public ServerLogChannel(ServerContext serverCtx)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### ServerLogChannel

          public ServerLogChannel(ServerContext serverCtx,
                          java.lang.String channelName,
                          boolean isSubChannel)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### getServerContext

          public ServerContext getServerContext()

      Description copied from interface: `ServerObject`
      Returns the server runtime environment
      Specified by:
        `getServerContext` in interface `ServerObject<ServerContext>`

    - #### openLogFile

          public LogPrinterFile openLogFile(boolean useLastLogfile)
                                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### isLogFileOpen

          public boolean isLogFileOpen()

    - #### getLogDir

          public java.io.File getLogDir()

    - #### cleanupLogFiles

          public void cleanupLogFiles()

      Removes obsolete log-files in all log directories according to the current server logging parameters.

    - #### logFatal

          public void logFatal(java.lang.Object caller,
                      java.lang.String message,
                      java.lang.Exception e)

      Overridden to send an email message to administrators
      Specified by:
        `logFatal` in interface `LogSupport`
      Overrides:
        `logFatal` in class `LogChannel`

Copyright © 2012 EsprIT-Systems. All Rights Reserved.