Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Getting full log content from within a job

$
0
0
Hi,

I want to parse and process all log entries from inside a job - including all its sub-jobs, sub-transformations, etc. More or less the full log I'd get as an output using the kitchen command line script parameter.

What I've tried so far was using the UDJC step to get hold of the root job channel ID and then getting all its children like this:

Code:

// Get the root job log interface
LoggingObjectInterface logObjInterface = getTrans().getParent();
while (logObjInterface.getParent() != null) {
    logObjInterface = logObjInterface.getParent();
}

// Get all log events
LoggingRegistry loggingRegistry = LoggingRegistry.getInstance();
List childChannelIds = loggingRegistry.getLogChannelChildren(logObjInterface.getLogChannelId());
List logEvents = KettleLogStore.getLogBufferFromTo(childChannelIds, true, 0, 999999);

But this seems to only get "some" events (mostly from jobs, but no transformations at all), even though the API documenation for KettleLogStore.getLogBufferFromTo says: Get all the log lines for the specified parent log channel id (including all children)

How can I get ALL the log entries, ideally as a String of the job I run, please?

Thanks.

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>