[hotfix] Use standard method to check for debug flag
package org.apache.streampipes.container.api;
+import org.apache.streampipes.commons.constants.Envs;
import org.apache.streampipes.commons.exceptions.SpRuntimeException;
import org.apache.streampipes.container.declarer.Declarer;
import org.apache.streampipes.container.declarer.InvocableDeclarer;
@@ -45,6 +46,7 @@ public abstract class InvocablePipelineElementResource<I extends InvocableStream
private static final Logger LOG = LoggerFactory.getLogger(InvocablePipelineElementResource.class);
protected abstract Map<String, D> getElementDeclarers();
+
protected abstract String getInstanceId(String uri, String elementId);
protected Class<I> clazz;
@@ -62,6 +64,7 @@ public abstract class InvocablePipelineElementResource<I extends InvocableStream
try {
if (isDebug()) {
+ LOG.info("SP_DEBUG env variable is set - overriding broker hostname and port for local development");
graph = createGroundingDebugInformation(graph);
}
@@ -169,7 +172,7 @@ public abstract class InvocablePipelineElementResource<I extends InvocableStream
protected abstract I createGroundingDebugInformation(I graph);
private Boolean isDebug() {
- return "true".equals(System.getenv("SP_DEBUG"));
+ return Envs.SP_DEBUG.exists() && Envs.SP_DEBUG.getValueAsBoolean();
}
private String getServiceGroup() {
