Package org.pentaho.di.core.logging
Class KettleLogStore
java.lang.Object
org.pentaho.di.core.logging.KettleLogStore
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddiscardLines(String parentLogChannelId, boolean includeGeneralMessages) Discard all the lines for the specified log channel id AND all the children.static LoggingBufferstatic KettleLogStorestatic intstatic 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)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)static LogChannelInterfaceFactorystatic voidinit()static voidinit(boolean redirectStdOut, boolean redirectStdErr) Initialize the central log store with arguments specifying whether to redirect of stdout and stderrstatic voidinit(int maxSize, int maxLogTimeoutMinutes) Initialize the central log store with optional limitation to the sizestatic voidinit(int maxSize, int maxLogTimeoutMinutes, boolean redirectStdOut, boolean redirectStdErr) Initialize the central log store with optional limitation to the size and redirect of stdout and stderrstatic booleanvoidreplaceLogCleaner(int maxLogTimeoutMinutes) voidreset()static voidsetLogChannelInterfaceFactory(LogChannelInterfaceFactory logChannelInterfaceFactory)
-
Field Details
-
OriginalSystemOut
-
OriginalSystemErr
-
-
Method Details
-
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 sizemaxLogTimeoutMinutes- the maximum time that a log line times out in hoursredirectStdOut- a boolean indicating whether to redirect stdout to the logging frameworkredirectStdErr- 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 sizemaxLogTimeoutMinutes- 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 frameworkredirectStdErr- a boolean indicating whether to redirect stderr to the logging framework
-
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 grabincludeGeneral- include general log linesfrom-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 grabincludeGeneral- include general log linesfrom-to-- Returns:
-
getAppender
- Returns:
- The appender that represents the central logging store. It is capable of giving back log rows in an incremental fashion, etc.
-
discardLines
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()
-