From: Tuukka Lehtonen Date: Fri, 14 Oct 2022 07:46:42 +0000 (+0300) Subject: Add trace logging for AbstractActionContext.stop X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=9ed9faa6b31ff515bcf786a79417e508b1c8cde9;p=simantics%2Fplatform.git Add trace logging for AbstractActionContext.stop --- diff --git a/bundles/org.simantics.simulation.sequences/META-INF/MANIFEST.MF b/bundles/org.simantics.simulation.sequences/META-INF/MANIFEST.MF index fd89d22fe..999915463 100644 --- a/bundles/org.simantics.simulation.sequences/META-INF/MANIFEST.MF +++ b/bundles/org.simantics.simulation.sequences/META-INF/MANIFEST.MF @@ -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 diff --git a/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java b/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java index 5b5917f6a..2900fb07e 100644 --- a/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java +++ b/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java @@ -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); }