@@ -615,7 +615,7 @@ async fn run_process_async(executable: &str, args: Option<Vec<String>>, input: O
615
615
let stderr_task = tokio:: spawn ( async move {
616
616
let mut filtered_stderr = String :: with_capacity ( 1024 * 1024 ) ;
617
617
while let Ok ( Some ( stderr_line) ) = stderr_reader. next_line ( ) . await {
618
- let filtered_stderr_line = log_stderr_line ( "pn" , & child_id, & stderr_line) ;
618
+ let filtered_stderr_line = log_stderr_line ( & child_id, & stderr_line) ;
619
619
if !filtered_stderr_line. is_empty ( ) {
620
620
filtered_stderr. push_str ( filtered_stderr_line) ;
621
621
filtered_stderr. push ( '\n' ) ;
@@ -815,21 +815,21 @@ fn json_to_hashmap(json: &str) -> Result<HashMap<String, String>, DscError> {
815
815
/// * `process_name` - The name of the process
816
816
/// * `process_id` - The ID of the process
817
817
/// * `trace_line` - The stderr line from the process
818
- pub fn log_stderr_line < ' a > ( process_name : & str , process_id : & u32 , trace_line : & ' a str ) -> & ' a str
818
+ pub fn log_stderr_line < ' a > ( process_id : & u32 , trace_line : & ' a str ) -> & ' a str
819
819
{
820
820
if !trace_line. is_empty ( )
821
821
{
822
822
if let Result :: Ok ( json_obj) = serde_json:: from_str :: < Value > ( trace_line) {
823
823
if let Some ( msg) = json_obj. get ( "Error" ) {
824
- error ! ( "Process '{process_name}' id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
824
+ error ! ( "Process id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
825
825
} else if let Some ( msg) = json_obj. get ( "Warning" ) {
826
- warn ! ( "Process '{process_name}' id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
826
+ warn ! ( "Process id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
827
827
} else if let Some ( msg) = json_obj. get ( "Info" ) {
828
- info ! ( "Process '{process_name}' id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
828
+ info ! ( "Process id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
829
829
} else if let Some ( msg) = json_obj. get ( "Debug" ) {
830
- debug ! ( "Process '{process_name}' id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
830
+ debug ! ( "Process id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
831
831
} else if let Some ( msg) = json_obj. get ( "Trace" ) {
832
- trace ! ( "Process '{process_name}' id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
832
+ trace ! ( "Process id {process_id} : {}" , msg. as_str( ) . unwrap_or_default( ) ) ;
833
833
} else {
834
834
// the line is a valid json, but not one of standard trace lines - return it as filtered stderr_line
835
835
return trace_line;
0 commit comments