From 608bbe05f2a9f7f39e69d45d6e5817da128623cf Mon Sep 17 00:00:00 2001
From: Hans Fangohr <hans.fangohr@mpsd.mpg.de>
Date: Thu, 8 Jun 2023 21:29:53 +0200
Subject: [PATCH] Reduce output from run() (info -> debug)

Motivation:

- the actual command we run is pretty meaningless without context.
- to provide the context, we would need to add additional 'logging.info' command
  BEFORE we call `run`
- if we select loglevel `debug` we get to see the same output as before.
---
 mpsd-software-environment.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mpsd-software-environment.py b/mpsd-software-environment.py
index c4fd306..a926308 100755
--- a/mpsd-software-environment.py
+++ b/mpsd-software-environment.py
@@ -324,7 +324,7 @@ def run(*args, counter=[0], **kwargs):
     options = ", ".join([f"{key}={value}" for key, value in kwargs.items()])
 
     # provide information about upcoming subprocess.run call
-    logging.info(f"{token} Starting subprocess.run('{command}') with options {options}")
+    logging.debug(f"{token} Starting subprocess.run('{command}') with options {options}")
     logging.debug(f"{token}   getcwd={os.getcwd()}")
     logging.debug(f"{token}   exact call: subprocess.run({arg})")
 
-- 
GitLab