public MondrianHelper( DatabaseMeta databaseMeta, String catalog, String queryString, VariableSpace space ) { this.databaseMeta = databaseMeta; this.catalog = catalog; this.queryString = queryString; this.space = space; // The following may appear to be a hack, but I don't want to change the constructor for backward compatibility sake. if ( space instanceof StepInterface ) { log = ( (StepInterface) space ).getLogChannel(); } }
public RunThread( StepMetaDataCombi combi ) { this.step = combi.step; this.meta = combi.meta; this.data = combi.data; this.log = step.getLogChannel(); }
public StepInitThread( StepMetaDataCombi combi, LogChannelInterface log ) { this.combi = combi; this.log = combi.step.getLogChannel(); this.ok = false; this.finished = false; this.doIt = true; }
public MQTTClientBuilder withStep( StepInterface step ) { this.logChannel = step.getLogChannel(); this.stepName = step.getStepMeta().getName(); return this; }
@Override public void run() { for ( StepMetaDataCombi combi : trans.getSteps() ) { if ( combi.step.getErrors() > 0 ) { String channelId = combi.step.getLogChannel().getLogChannelId(); List<KettleLoggingEvent> eventList = KettleLogStore.getLogBufferFromTo( channelId, false, 0, KettleLogStore.getLastBufferLineNr() ); StringBuilder logText = new StringBuilder(); for ( KettleLoggingEvent event : eventList ) { Object message = event.getMessage(); if ( message instanceof LogMessage ) { LogMessage logMessage = (LogMessage) message; if ( logMessage.isError() ) { logText.append( logMessage.getMessage() ).append( Const.CR ); } } } stepLogMap.put( combi.stepMeta, logText.toString() ); } } } } );
@Override public void transFinished( Trans trans ) throws KettleException { // Copy over the data from the previewDelegate... // if ( trans.getErrors() != 0 ) { // capture logging and store it... // for ( StepMetaDataCombi combi : trans.getSteps() ) { if ( combi.copy == 0 ) { StringBuffer logBuffer = KettleLogStore.getAppender().getBuffer( combi.step.getLogChannel().getLogChannelId(), false ); previewLogMap.put( combi.stepMeta, logBuffer ); } } } } } );
break; case CHANNEL_ID: value = combi.step.getLogChannel().getLogChannelId(); break; case LOG_DATE: break; case LOG_FIELD: value = getLogBuffer( combi.step, combi.step.getLogChannel().getLogChannelId(), status, null ); break; default:
public void run() { // Set the internal variables also on the initialization thread! // ((BaseStep)combi.step).setInternalVariables(); if ( !doIt ) { // An extension point plugin decided we should not initialize the step. // Logging, error handling, finished flag... should all be handled in the extension point. // return; } try { combi.step.getLogChannel().snap( Metrics.METRIC_STEP_INIT_START ); if ( combi.step.init( combi.meta, combi.data ) ) { combi.data.setStatus( StepExecutionStatus.STATUS_IDLE ); ok = true; } else { combi.step.setErrors( 1 ); log.logError( BaseMessages.getString( PKG, "Trans.Log.ErrorInitializingStep", combi.step.getStepname() ) ); } } catch ( Throwable e ) { log.logError( BaseMessages.getString( PKG, "Trans.Log.ErrorInitializingStep", combi.step.getStepname() ) ); log.logError( Const.getStackTracker( e ) ); } finally { combi.step.getLogChannel().snap( Metrics.METRIC_STEP_INIT_STOP ); } finished = true; }
public void run() { try { step.setRunning( true ); step.getLogChannel().snap( Metrics.METRIC_STEP_EXECUTION_START ); step.getLogChannel().snap( Metrics.METRIC_STEP_EXECUTION_STOP ); try { long li = step.getLinesInput();
LogChannelInterface logChannel = combi.step.getLogChannel(); logChannel.setLogLevel( logLevel ); logChannel.setGatheringMetrics( log.isGatheringMetrics() );