Skip to content

Commit

Permalink
Merge pull request apache#4360 from nadment/4358
Browse files Browse the repository at this point in the history
Pipeline Log is logging preview apache#4358
  • Loading branch information
hansva authored Sep 25, 2024
2 parents 3d46c53 + 26c5598 commit 10a1a82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions engine/src/main/java/org/apache/hop/pipeline/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -2469,6 +2469,7 @@ public void resumeExecution() {
* @return true if the pipeline is being previewed, false otherwise
*/
@Override
@Deprecated(since = "2.10")
public boolean isPreview() {
return preview;
}
Expand All @@ -2479,6 +2480,7 @@ public boolean isPreview() {
* @param preview true if the pipeline is being previewed, false otherwise
*/
@Override
@Deprecated(since = "2.10")
public void setPreview(boolean preview) {
this.preview = preview;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public void callExtensionPoint(ILogChannel log, IVariables variables, Pipeline p

// Is the pipeline doing a preview? We don't want to log in that case.
//
String previewVariable = pipeline.getVariable(IPipelineEngine.PIPELINE_IN_PREVIEW_MODE, "N");
if (Const.toBoolean(previewVariable)) {
if (pipeline.getVariableBoolean(IPipelineEngine.PIPELINE_IN_PREVIEW_MODE, false)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.debug.PipelineDebugMeta;
import org.apache.hop.pipeline.debug.TransformDebugMeta;
import org.apache.hop.pipeline.engine.IPipelineEngine;
import org.apache.hop.pipeline.engines.local.LocalPipelineEngine;
import org.apache.hop.pipeline.transform.TransformMeta;
import org.apache.hop.ui.core.dialog.ErrorDialog;
Expand Down Expand Up @@ -152,6 +153,7 @@ private void doPreview(
//
pipeline = new LocalPipelineEngine(pipelineMeta, variables, hopGui.getLoggingObject());
pipeline.setPreview(true);
pipeline.setVariable(IPipelineEngine.PIPELINE_IN_PREVIEW_MODE, "Y");
pipeline.setMetadataProvider(hopGui.getMetadataProvider());

// Prepare the execution...
Expand Down

0 comments on commit 10a1a82

Please sign in to comment.