more appropriate logging levels

This commit is contained in:
Jonathan Shook 2020-04-22 07:23:50 -05:00
parent 87ad8e6210
commit 908ab7c1a3
3 changed files with 9 additions and 8 deletions

View File

@ -65,7 +65,8 @@ public class AtomicInput implements Input, ActivityDefObserver, ProgressCapable
long next = current + stride; long next = current + stride;
if (next > max.get()) { if (next > max.get()) {
if (recycleValue.get()>=recycleMax.get()) { if (recycleValue.get()>=recycleMax.get()) {
logger.debug("Exhausted input for " + activityDef.getAlias() + " at " + current + ", recycle count " + recycleValue.get()); logger.trace("Exhausted input for " + activityDef.getAlias() + " at " + current + ", recycle " +
"count " + recycleValue.get());
return null; return null;
} else { } else {
if (cycleValue.compareAndSet(current,min.get()+stride)) { if (cycleValue.compareAndSet(current,min.get()+stride)) {

View File

@ -256,7 +256,7 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
} }
if (cycleSegment == null) { if (cycleSegment == null) {
logger.debug("input exhausted (input " + input + ") via null segment, stopping motor thread " + slotId); logger.trace("input exhausted (input " + input + ") via null segment, stopping motor thread " + slotId);
slotStateTracker.enterState(Finished); slotStateTracker.enterState(Finished);
continue; continue;
} }
@ -368,7 +368,7 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
} }
if (cycleSegment == null) { if (cycleSegment == null) {
logger.debug("input exhausted (input " + input + ") via null segment, stopping motor thread " + slotId); logger.trace("input exhausted (input " + input + ") via null segment, stopping motor thread " + slotId);
slotStateTracker.enterState(Finished); slotStateTracker.enterState(Finished);
continue; continue;
} }

View File

@ -130,12 +130,12 @@ public class Scenario implements Callable<ScenarioResult> {
public void run() { public void run() {
init(); init();
logger.info("Running control script for " + getName() + "."); logger.debug("Running control script for " + getName() + ".");
for (String script : scripts) { for (String script : scripts) {
try { try {
Object result = null; Object result = null;
if (scriptEngine instanceof Compilable) { if (scriptEngine instanceof Compilable) {
logger.info("Using direct script compilation"); logger.debug("Using direct script compilation");
Compilable compilableEngine = (Compilable) scriptEngine; Compilable compilableEngine = (Compilable) scriptEngine;
CompiledScript compiled = compilableEngine.compile(script); CompiledScript compiled = compilableEngine.compile(script);
result = compiled.eval(); result = compiled.eval();
@ -143,7 +143,7 @@ public class Scenario implements Callable<ScenarioResult> {
result = scriptEngine.eval(script); result = scriptEngine.eval(script);
} }
if (result!=null) { if (result!=null) {
logger.debug("result: type(" + result.getClass().getCanonicalName() + "): value:" + result.toString()); logger.debug("scenario result: type(" + result.getClass().getCanonicalName() + "): value:" + result.toString());
} }
System.err.flush(); System.err.flush();
System.out.flush(); System.out.flush();
@ -171,9 +171,9 @@ public class Scenario implements Callable<ScenarioResult> {
} }
} }
int awaitCompletionTime = 86400*365*1000; int awaitCompletionTime = 86400*365*1000;
logger.info("Awaiting completion of scenario for " + awaitCompletionTime + " millis."); logger.debug("Awaiting completion of scenario for " + awaitCompletionTime + " millis.");
scenarioController.awaitCompletion(awaitCompletionTime); scenarioController.awaitCompletion(awaitCompletionTime);
logger.trace("scenario complete"); logger.debug("scenario completed without errors");
} }
public ScenarioResult call() { public ScenarioResult call() {