本文整理汇总了Java中org.pentaho.di.core.logging.KettleLogStore.getLastBufferLineNr方法的典型用法代码示例。如果您正苦于以下问题:Java KettleLogStore.getLastBufferLineNr方法的具体用法?Java KettleLogStore.getLastBufferLineNr怎么用?Java KettleLogStore.getLastBufferLineNr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.logging.KettleLogStore
的用法示例。
在下文中一共展示了KettleLogStore.getLastBufferLineNr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleError
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
private boolean handleError() throws KettleStepException {
SingleThreaderData singleThreaderData = getData();
if ( getStepMeta().isDoingErrorHandling() ) {
int lastLogLine = KettleLogStore.getLastBufferLineNr();
StringBuffer logText =
KettleLogStore.getAppender().getBuffer( singleThreaderData.mappingTrans.getLogChannelId(), false, singleThreaderData.lastLogLine );
singleThreaderData.lastLogLine = lastLogLine;
for ( Object[] row : singleThreaderData.errorBuffer ) {
putError( getInputRowMeta(), row, 1L, logText.toString(), null, "STR-001" );
}
singleThreaderData.executor.clearError();
return true; // continue
} else {
setErrors( 1 );
stopAll();
logError( BaseMessages.getString( PKG, "SingleThreader.Log.ErrorOccurredInSubTransformation" ) );
return false; // stop running
}
}
示例2: getTransformationLog
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@GET
@Path( "/log/{id : .+}/{logStart : .+}" )
@Produces( { MediaType.TEXT_PLAIN } )
public String getTransformationLog( @PathParam( "id" ) String id, @PathParam( "logStart" ) int startLineNr ) {
int lastLineNr = KettleLogStore.getLastBufferLineNr();
Trans trans = CarteResource.getTransformation( id );
String logText =
KettleLogStore.getAppender().getBuffer(
trans.getLogChannel().getLogChannelId(), false, startLineNr, lastLineNr ).toString();
return logText;
}
示例3: getJobLog
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@GET
@Path( "/log/{id : .+}/{logStart : .+}" )
@Produces( { MediaType.TEXT_PLAIN } )
public String getJobLog( @PathParam( "id" ) String id, @PathParam( "logStart" ) int startLineNr ) {
int lastLineNr = KettleLogStore.getLastBufferLineNr();
Job job = CarteResource.getJob( id );
String logText =
KettleLogStore.getAppender().getBuffer(
job.getLogChannel().getLogChannelId(), false, startLineNr, lastLineNr ).toString();
return logText;
}