added proper logging facility

This commit is contained in:
2026-07-13 22:47:54 +02:00
parent fa064c1727
commit 0eb44039f0
6 changed files with 315 additions and 53 deletions
+4 -1
View File
@@ -3,10 +3,13 @@ import io
import traceback
import sys
import time
import logging
import ast
from damaris.experiments.Experiment import Quit
from damaris.experiments import Experiment
logger = logging.getLogger("damaris.experiment_handling")
class StopExperiment(Exception):
pass
@@ -66,7 +69,7 @@ class ExperimentHandling(threading.Thread):
found_blocking_sleep = True
if found_blocking_sleep:
print("Warning: time.sleep() detected in experiment script. This is blocking and not interruptible. Please use sleep() instead.")
logger.warning("time.sleep() detected in experiment script. This is blocking and not interruptible. Please use sleep() instead.")
break
except Exception:
pass