X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FExecutionAspect.java;h=e9c3c481c68fd65269e5b0885a1df35b03e57433;hb=32f9566efa0d0ce29b31ee0779faf2b42f46321a;hp=cdafe446d9a33727307ec9019049aad1893e1e94;hpb=f3e477b3048c639451df616cfa61564eae11efbb;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java index cdafe446d..e9c3c481c 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java @@ -47,16 +47,12 @@ public class ExecutionAspect { executionContext.setVariable(ExecutionContext.VAR_FLOW_NAME, executionFlow.getName()); - if (log.isDebugEnabled()) - logStackEvent("=> ", executionFlow); - + logStackEvent("=> ", executionFlow, false); try { // Actually execute the flow pjp.proceed(); } finally { - if (log.isDebugEnabled()) - logStackEvent("<= ", executionFlow); - + logStackEvent("<= ", executionFlow, true); executionStack.leaveFlow(executionFlow); } } @@ -89,14 +85,18 @@ public class ExecutionAspect { this.executionContext = executionContext; } - protected void logStackEvent(String symbol, ExecutionFlow executionFlow) { + protected void logStackEvent(String symbol, ExecutionFlow executionFlow, + Boolean trace) { Integer stackSize = executionStack.getStackSize(); if (log.isTraceEnabled()) log.debug(depthSpaces(stackSize) + symbol + executionFlow + " #" + executionStack.getCurrentStackLevelUuid() + ", depth=" + stackSize); - else if (log.isDebugEnabled()) + else if (log.isDebugEnabled() && !trace) log.debug(depthSpaces(stackSize) + symbol + executionFlow); + else if (log.isTraceEnabled() && trace) + log.trace(depthSpaces(stackSize) + symbol + executionFlow); + } protected void logRunnableExecution(ExecutionFlow executionFlow,