org.pentaho.di.core.logging
Class CentralLogStore

java.lang.Object
  extended by org.pentaho.di.core.logging.CentralLogStore

public class CentralLogStore
extends Object


Method Summary
static void discardLines(String parentLogChannelId, boolean includeGeneralMessages)
          Discard all the lines for the specified log channel id AND all the children.
static Log4jBufferAppender getAppender()
           
static int getLastBufferLineNr()
           
static List<org.apache.log4j.spi.LoggingEvent> 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)
static List<org.apache.log4j.spi.LoggingEvent> 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)
static void init()
           
static void init(int maxSize, int maxLogTimeoutMinutes)
          Initialize the central log store with optional limitation to the size
 void replaceLogCleaner(int maxLogTimeoutMinutes)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

replaceLogCleaner

public void replaceLogCleaner(int maxLogTimeoutMinutes)

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
maxLogTimeoutHours - The maximum time that a log line times out in hours.

init

public static void init()

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<org.apache.log4j.spi.LoggingEvent> 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<org.apache.log4j.spi.LoggingEvent> 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 Log4jBufferAppender 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.