added proper logging facility

This commit is contained in:
markusro committed 2026-07-13 22:47:54 +02:00
1 parent fa064c1727
commit 0eb44039f0
6 files changed
+315 -53

No files matched your search

+4 -1
View File
@@ -4,10 +4,13 @@ import sys
import os
import os.path
import traceback
import logging
import ast
from damaris.data import Resultable
from damaris.gui.ExperimentHandling import StopExperiment
logger = logging.getLogger("damaris.result_handling")
class ResultHandling(threading.Thread):
"""
runs the result script in sandbox
@@ -52,7 +55,7 @@ class ResultHandling(threading.Thread):
found_blocking_sleep = True
if found_blocking_sleep:
print("Warning: time.sleep() detected in result script. This is blocking and not interruptible. Please use sleep() instead.")
logger.warning("time.sleep() detected in result script. This is blocking and not interruptible. Please use sleep() instead.")
break
except Exception:
pass