diff --git a/yao/actor.py b/yao/actor.py index 11d1501..f3fcc60 100644 --- a/yao/actor.py +++ b/yao/actor.py @@ -60,7 +60,11 @@ def __init__(self, *args, **kwargs): # but in practice for now that's fine. log_path = self.log.log_filename - mech_log = pathlib.Path(log_path).parent / "spec-mech.log" if log_path else None + write_mech_log = self.config["specMech"].get("write_log", False) + if log_path and write_mech_log: + mech_log = pathlib.Path(log_path).parent / "spec-mech.log" + else: + mech_log = None self.spec_mech = MechController( self.config["specMech"]["address"], diff --git a/yao/etc/yao.yml b/yao/etc/yao.yml index 16b6125..c74b31a 100644 --- a/yao/etc/yao.yml +++ b/yao/etc/yao.yml @@ -49,6 +49,7 @@ header: specMech: address: 192.168.1.3 port: 23 + write_log: true motors: minP: 85000 maxP: 800000