diff --git a/openhcs/core/components/validation.py b/openhcs/core/components/validation.py index c2bb0c3de1..27cfbedc8a 100644 --- a/openhcs/core/components/validation.py +++ b/openhcs/core/components/validation.py @@ -71,9 +71,11 @@ def __init__(self, config: ComponentConfiguration[T]): config: ComponentConfiguration for validation rules """ self.config = config - logger.debug( - f"GenericValidator initialized for components: {[c.value for c in config.all_components]}" - ) + if logger.isEnabledFor(logging.DEBUG): + logger.debug( + "GenericValidator initialized for components: %s", + [c.value for c in config.all_components], + ) def validate_step( self, diff --git a/openhcs/core/steps/function_runtime.py b/openhcs/core/steps/function_runtime.py index 7b97c71464..3fc5aaaad1 100644 --- a/openhcs/core/steps/function_runtime.py +++ b/openhcs/core/steps/function_runtime.py @@ -679,9 +679,12 @@ def load_input_stack( if not producer_matching_files: matching_files.sort() - logger.debug( - f"Pattern {self.pattern_repr} sorted files: {[Path(f).name for f in matching_files]}" - ) + if logger.isEnabledFor(logging.DEBUG): + logger.debug( + "Pattern %s sorted files: %s", + self.pattern_repr, + [Path(f).name for f in matching_files], + ) matching_files = self._filter_matching_files_for_source_bindings(matching_files) full_file_paths = [ @@ -1841,7 +1844,9 @@ def load_artifact_inputs( if not self.should_load_artifact_inputs(): return {} logger.info( - f"Artifact inputs for {self.invocation.contract.function_name}: {self.artifact_inputs}" + "Artifact inputs for %s: %s", + self.invocation.contract.function_name, + self.artifact_inputs, ) loaded_artifact_payloads: dict[ArtifactSpecRef, RuntimePayload] = {} parameter_values: dict[str, list[RuntimeValue]] = {}