@@ -376,17 +376,30 @@ def stderr_stdout_log_path(
376376 except OSError as e :
377377 if e .errno == 2 :
378378 if runtime :
379- _logger .error ("'%s' not found: %s" , runtime [0 ], str (e ))
379+ _logger .error (
380+ "'%s' not found: %s" , runtime [0 ], str (e ), exc_info = runtimeContext .debug
381+ )
380382 else :
381- _logger .error ("'%s' not found: %s" , self .command_line [0 ], str (e ))
383+ _logger .error (
384+ "'%s' not found: %s" ,
385+ self .command_line [0 ],
386+ str (e ),
387+ exc_info = runtimeContext .debug ,
388+ )
382389 else :
383- _logger .exception ("Exception while running job" )
390+ _logger .exception (
391+ "Exception while running job: %s" , str (e ), exc_info = runtimeContext .debug
392+ )
384393 processStatus = "permanentFail"
385394 except WorkflowException as err :
386- _logger .error ("[job %s] Job error:\n %s" , self .name , str (err ))
395+ _logger .error (
396+ "[job %s] Job error:\n %s" , self .name , str (err ), exc_info = runtimeContext .debug
397+ )
387398 processStatus = "permanentFail"
388- except Exception :
389- _logger .exception ("Exception while running job" )
399+ except Exception as err :
400+ _logger .exception (
401+ "Exception while running job: %s." , str (err ), exc_info = runtimeContext .debug
402+ )
390403 processStatus = "permanentFail"
391404 if (
392405 runtimeContext .research_obj is not None
@@ -795,7 +808,7 @@ def run(
795808 )
796809 except Exception as err :
797810 container = "Singularity" if runtimeContext .singularity else "Docker"
798- _logger .debug ("%s error" , container , exc_info = True )
811+ _logger .debug ("%s error" , container , exc_info = runtimeContext . debug )
799812 if docker_is_req :
800813 raise UnsupportedRequirement (
801814 f"{ container } is required to run this tool: { str (err )} "
0 commit comments