Skip to content

Commit

Permalink
improve OperationalStep debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinovg committed Aug 16, 2023
1 parent 32a4cd7 commit e7232a7
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,25 @@ public void setOptional(boolean optional) {

public OperationResult run(DataStore data) {
OperationResult result = OperationResult.badRequest();
log.debug("Processing in STEP");
log.debug("Execution step is optional? " + optional);
long start = System.currentTimeMillis();
if (log.isDebugEnabled()) {
log.debug("Started execution in step.");
if (optional) {
log.debug("Operation step is optional.");
}
}
if (operation != null) {
log.debug("Operation not null");
ParameterSubstitutor.forwardSubstitution(substitutions, data);
result = operation.run(data);
ParameterSubstitutor.backwardSubstitution(substitutions, data);
if (!optional && result.hasError()) {
return result;
}
}
if (log.isDebugEnabled()) {
long time = System.currentTimeMillis() - start;
log.debug("Step execution time: " + time + "ms");
}
return nextStep.run(data);
}

Expand Down

0 comments on commit e7232a7

Please sign in to comment.