]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Add trace logging for AbstractActionContext.stop
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Oct 2022 07:46:42 +0000 (10:46 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Oct 2022 07:46:42 +0000 (10:46 +0300)
bundles/org.simantics.simulation.sequences/META-INF/MANIFEST.MF
bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java

index fd89d22fe1fe22b21b780db4c5ee646d59f02977..999915463754270e94c928e1108224507fc39a81 100644 (file)
@@ -6,5 +6,6 @@ Bundle-Version: 1.0.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Require-Bundle: org.junit;bundle-version="4.12.0";resolution:=optional,
  org.simantics.scl.osgi;bundle-version="1.0.4",
- gnu.trove3;bundle-version="3.0.3"
+ gnu.trove3;bundle-version="3.0.3",
+ org.slf4j.api
 Export-Package: org.simantics.simulation.sequences.action
index 5b5917f6ab33d3b016bd685ad0d391dfcb58f8a4..2900fb07e3ee94538411c4db2ea8f9ff329f21c3 100644 (file)
@@ -8,8 +8,13 @@ import java.util.PriorityQueue;
 import org.simantics.scl.runtime.SCLContext;
 import org.simantics.scl.runtime.function.Function1;
 import org.simantics.scl.runtime.tuple.Tuple0;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractActionContext implements ActionContext {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractActionContext.class);
+
     public static final double TIME_TOLERANCE = 1e-6;
     
     double currentTime;
@@ -70,6 +75,9 @@ public abstract class AbstractActionContext implements ActionContext {
     }
 
     public void stop(StopReason reason) {
+        if (LOGGER.isTraceEnabled()) {
+            LOGGER.trace("stop context {}, reason={}", System.identityHashCode(this), reason, new Exception("trace"));
+        }
         stopped = true;
         handleStop(reason);
     }