@@ -259,11 +259,12 @@ def rm_pending_output_callback(output_callback, jobcachepending,
259259 j .hints = self .hints
260260 j .name = jobname
261261
262- _logger .debug (u"[job %s] initializing from %s%s" ,
263- j .name ,
264- self .tool .get ("id" , "" ),
265- u" as part of %s" % kwargs ["part_of" ] if "part_of" in kwargs else "" )
266- _logger .debug (u"[job %s] %s" , j .name , json .dumps (joborder , indent = 4 ))
262+ if _logger .isEnabledFor (logging .DEBUG ):
263+ _logger .debug (u"[job %s] initializing from %s%s" ,
264+ j .name ,
265+ self .tool .get ("id" , "" ),
266+ u" as part of %s" % kwargs ["part_of" ] if "part_of" in kwargs else "" )
267+ _logger .debug (u"[job %s] %s" , j .name , json .dumps (joborder , indent = 4 ))
267268
268269
269270 builder .pathmapper = None
@@ -274,7 +275,8 @@ def rm_pending_output_callback(output_callback, jobcachepending,
274275 builder .pathmapper = self .makePathMapper (reffiles , builder .stagedir , ** make_path_mapper_kwargs )
275276 builder .requirements = j .requirements
276277
277- _logger .debug (u"[job %s] path mappings is %s" , j .name , json .dumps ({p : builder .pathmapper .mapper (p ) for p in builder .pathmapper .files ()}, indent = 4 ))
278+ if _logger .isEnabledFor (logging .DEBUG ):
279+ _logger .debug (u"[job %s] path mappings is %s" , j .name , json .dumps ({p : builder .pathmapper .mapper (p ) for p in builder .pathmapper .files ()}, indent = 4 ))
278280
279281 _check_adjust = partial (check_adjust , builder )
280282
@@ -297,7 +299,8 @@ def rm_pending_output_callback(output_callback, jobcachepending,
297299 if os .path .isabs (j .stdout ) or ".." in j .stdout or not j .stdout :
298300 raise validate .ValidationException ("stdout must be a relative path" )
299301
300- _logger .debug (u"[job %s] command line bindings is %s" , j .name , json .dumps (builder .bindings , indent = 4 ))
302+ if _logger .isEnabledFor (logging .DEBUG ):
303+ _logger .debug (u"[job %s] command line bindings is %s" , j .name , json .dumps (builder .bindings , indent = 4 ))
301304
302305 dockerReq = self .get_requirement ("DockerRequirement" )[0 ]
303306 if dockerReq and kwargs .get ("use_container" ):
@@ -383,7 +386,8 @@ def collect_output_ports(self, ports, builder, outdir, compute_checksum=True):
383386 if fs_access .exists (custom_output ):
384387 with fs_access .open (custom_output , "r" ) as f :
385388 ret = json .load (f )
386- _logger .debug (u"Raw output from %s: %s" , custom_output , json .dumps (ret , indent = 4 ))
389+ if _logger .isEnabledFor (logging .DEBUG ):
390+ _logger .debug (u"Raw output from %s: %s" , custom_output , json .dumps (ret , indent = 4 ))
387391 else :
388392 for port in ports :
389393 fragment = shortname (port ["id" ])
0 commit comments