Skip to content

Commit fdd25e9

Browse files
authored
Merge pull request #219 from cmd-ntrf/log
Improve submit_batch_script logging
2 parents f7de5ad + 9fc2a83 commit fdd25e9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

batchspawner/batchspawner.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,16 @@ async def submit_batch_script(self):
278278
if hasattr(self, "user_options"):
279279
subvars.update(self.user_options)
280280
script = await self._get_batch_script(**subvars)
281-
self.log.info("Spawner submitting job using " + cmd)
282-
self.log.info("Spawner submitted script:\n" + script)
281+
self.log.info("Spawner script options: %s", subvars)
282+
self.log.info("Spawner submitting command: %s", cmd)
283+
self.log.debug("Spawner submitting script:\n%s", script)
284+
self.log.debug("Spawner submitting environment: %s", self.get_env())
283285
out = await self.run_command(cmd, input=script, env=self.get_env())
284286
try:
285-
self.log.info("Job submitted. cmd: " + cmd + " output: " + out)
287+
self.log.info("Job submitted. output: %s", out)
286288
self.job_id = self.parse_job_id(out)
287289
except:
288-
self.log.error("Job submission failed with exit code " + out)
290+
self.log.error("Job submission failed. exit code: %s", out)
289291
self.job_id = ""
290292
return self.job_id
291293

0 commit comments

Comments
 (0)