Appending SiddhiAppContextName in file writing
@@ -222,6 +222,7 @@ public class CalculatePerformanceStreamProcessorExtension extends StreamProcesso
executorService = siddhiAppContext.getExecutorService();
siddhiAppContextName = siddhiAppContext.getName();
+
if (attributeExpressionLength == 2) {
if (!(attributeExpressionExecutors[0] instanceof VariableExpressionExecutor)) {
throw new SiddhiAppValidationException("iijTimeStamp has to be a variable but found " +
@@ -530,19 +531,11 @@ public class CalculatePerformanceStreamProcessorExtension extends StreamProcesso
log.error("Error while creating the output directory.");
}
}
- int len = siddhiAppContextName.length();
- String currentInstance = siddhiAppContextName.
- substring((len - 1) , len);
-
-
- String currentExecutionGroup = siddhiAppContextName.
- substring((len - 3) , len - 2);
sequenceNumber = getLogFileSequenceNumber();
outputFileTimeStamp = System.currentTimeMillis();
- fstream = new OutputStreamWriter(new FileOutputStream(new File(logDir + "/output" +
- currentExecutionGroup + "_" +
- currentInstance + "-" +
+ fstream = new OutputStreamWriter(new FileOutputStream(new File(logDir + "/output-" +
+ siddhiAppContextName + "-" +
sequenceNumber + "-" +
(outputFileTimeStamp)
