Public Access
added proper logging facility
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user