Skip to content

Commit

Permalink
Put 'Step running with args' back into log
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavies-st committed Feb 29, 2024
1 parent 30076af commit e747142
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/stpipe/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,17 +430,23 @@ def run(self, *args):

step_result = None

self.log.info("Step %s running with args %s.", self.name, args)
# log Step or Pipeline parameters from top level only
if self.parent is None:
self.log.info(
"Step %s parameters are: %s",
"Step %s parameters are:%s",
self.name,
"\n"
+ yaml.dump(self.get_pars(), sort_keys=False)
# Convert serialized YAML types true/false/null to Python types
.replace(" false", " False")
.replace(" true", " True")
.replace(" null", " None"),
# Add an indent to each line of the YAML output
"\n "
+ "\n ".join(
yaml.dump(self.get_pars(), sort_keys=False)
.strip()
# Convert serialized YAML types true/false/null to Python types
.replace(" false", " False")
.replace(" true", " True")
.replace(" null", " None")
.splitlines()
),
)

if len(args):
Expand Down

0 comments on commit e747142

Please sign in to comment.