Package org.pentaho.di.core.logging
Class KettleLogStore
java.lang.Object
org.pentaho.di.core.logging.KettleLogStore
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
discardLines
(String parentLogChannelId, boolean includeGeneralMessages) Discard all the lines for the specified log channel id AND all the children.static LoggingBuffer
static KettleLogStore
static int
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)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 LogChannelInterfaceFactory
static void
init()
static void
init
(boolean redirectStdOut, boolean redirectStdErr) Initialize the central log store with arguments specifying whether to redirect of stdout and stderrstatic void
init
(int maxSize, int maxLogTimeoutMinutes) Initialize the central log store with optional limitation to the sizestatic 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 stderrstatic boolean
void
replaceLogCleaner
(int maxLogTimeoutMinutes) void
reset()
static void
setLogChannelInterfaceFactory
(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()
-