File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
granulate_utils/gprofiler Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ def get_java_version_logged(
352
352
logger : Union [logging .LoggerAdapter , logging .Logger ],
353
353
) -> Optional [str ]:
354
354
java_version = get_java_version (process , stop_event , logger )
355
- logger .debug ("java -version output" , java_version_output = java_version , pid = process .pid )
355
+ logger .debug ("java -version output" , extra = { "java_version_output" : java_version , " pid" : process .pid } )
356
356
return java_version
357
357
358
358
@@ -678,7 +678,7 @@ def _run_async_profiler(self, cmd: List[str]) -> str:
678
678
else :
679
679
ap_log = self ._read_ap_log ()
680
680
ap_log_stripped = MEM_INFO_LOG_RE .sub ("" , ap_log ) # strip out mem info log only when for gProfiler log
681
- self .logger .debug ("async-profiler log" , jattach_cmd = cmd , ap_log = ap_log_stripped )
681
+ self .logger .debug ("async-profiler log" , extra = { "jattach_cmd" : cmd , " ap_log" : ap_log_stripped } )
682
682
return ap_log
683
683
684
684
def _run_fdtransfer (self ) -> None :
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ def start_process(
114
114
if isinstance (cmd , str ):
115
115
cmd = [cmd ]
116
116
117
- logger .debug ("Running command" , command = cmd )
117
+ logger .debug ("Running command" , extra = { "command" : cmd } )
118
118
119
119
env = kwargs .pop ("env" , None )
120
120
staticx_dir = get_staticx_dir ()
@@ -303,13 +303,13 @@ def run_process(
303
303
result : CompletedProcess [bytes ] = CompletedProcess (process .args , retcode , stdout , stderr )
304
304
305
305
# decoding stdout/stderr as latin-1 which should never raise UnicodeDecodeError.
306
- extra : Dict [str , Any ] = {"exit_code" : result .returncode }
306
+ extra : Dict [str , Any ] = {"exit_code" : result .returncode , "command" : process . args }
307
307
if not suppress_log :
308
308
if result .stdout :
309
309
extra ["stdout" ] = result .stdout .decode ("latin-1" )
310
310
if result .stderr :
311
311
extra ["stderr" ] = result .stderr .decode ("latin-1" )
312
- logger .debug ("Command exited" , command = process . args , ** extra )
312
+ logger .debug ("Command exited" , extra = extra )
313
313
if reraise_exc is not None :
314
314
raise reraise_exc
315
315
elif check and retcode != 0 :
You can’t perform that action at this time.
0 commit comments