Class KettleLogStore

java.lang.Object
org.pentaho.di.core.logging.KettleLogStore

public class KettleLogStore extends Object
  • Field Details

    • OriginalSystemOut

      public static PrintStream OriginalSystemOut
    • OriginalSystemErr

      public static PrintStream OriginalSystemErr
  • Method Details

    • getLogChannelInterfaceFactory

      public static LogChannelInterfaceFactory getLogChannelInterfaceFactory()
    • setLogChannelInterfaceFactory

      public static void setLogChannelInterfaceFactory(LogChannelInterfaceFactory logChannelInterfaceFactory)
    • replaceLogCleaner

      public void replaceLogCleaner(int maxLogTimeoutMinutes)
    • init

      public static void init(int maxSize, int maxLogTimeoutMinutes, boolean redirectStdOut, boolean redirectStdErr)
      Initialize the central log store with optional limitation to the size and redirect of stdout and stderr
      Parameters:
      maxSize - the maximum size
      maxLogTimeoutMinutes - the maximum time that a log line times out in hours
      redirectStdOut - a boolean indicating whether to redirect stdout to the logging framework
      redirectStdErr - a boolean indicating whether to redirect stderr to the logging framework
    • init

      public static void init(int maxSize, int maxLogTimeoutMinutes)
      Initialize the central log store with optional limitation to the size
      Parameters:
      maxSize - the maximum size
      maxLogTimeoutMinutes - The maximum time that a log line times out in hours.
    • init

      public static void init()
    • init

      public static void init(boolean redirectStdOut, boolean redirectStdErr)
      Initialize the central log store with arguments specifying whether to redirect of stdout and stderr
      Parameters:
      redirectStdOut - a boolean indicating whether to redirect stdout to the logging framework
      redirectStdErr - a boolean indicating whether to redirect stderr to the logging framework
    • getInstance

      public static KettleLogStore getInstance()
    • getLastBufferLineNr

      public static int getLastBufferLineNr()
      Returns:
      the number (sequence, 1..N) of the last log line. If no records are present in the buffer, 0 is returned.
    • getLogBufferFromTo

      public static List<KettleLoggingEvent> getLogBufferFromTo(String parentLogChannelId, boolean includeGeneral, int from, int to)
      Get all the log lines pertaining to the specified parent log channel id (including all children)
      Parameters:
      parentLogChannelId - the parent log channel ID to grab
      includeGeneral - include general log lines
      from -
      to -
      Returns:
      the log lines found
    • getLogBufferFromTo

      public static List<KettleLoggingEvent> getLogBufferFromTo(List<String> channelId, boolean includeGeneral, int from, int to)
      Get all the log lines for the specified parent log channel id (including all children)
      Parameters:
      channelId - channel IDs to grab
      includeGeneral - include general log lines
      from -
      to -
      Returns:
    • getAppender

      public static LoggingBuffer getAppender()
      Returns:
      The appender that represents the central logging store. It is capable of giving back log rows in an incremental fashion, etc.
    • discardLines

      public static void discardLines(String parentLogChannelId, boolean includeGeneralMessages)
      Discard all the lines for the specified log channel id AND all the children.
      Parameters:
      parentLogChannelId - the parent log channel id to be removed along with all its children.
    • isInitialized

      public static boolean isInitialized()
    • reset

      public void reset()