Skip to content

Commit 6d87247

Browse files
author
Andrew
committed
stage 3
1 parent bc8a32b commit 6d87247

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dsc_lib/src/dscresources/command_resource.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ async fn run_process_async(executable: &str, args: Option<Vec<String>>, input: O
615615
let stderr_task = tokio::spawn(async move {
616616
let mut filtered_stderr = String::with_capacity(1024*1024);
617617
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);
619619
if !filtered_stderr_line.is_empty() {
620620
filtered_stderr.push_str(filtered_stderr_line);
621621
filtered_stderr.push('\n');
@@ -815,21 +815,21 @@ fn json_to_hashmap(json: &str) -> Result<HashMap<String, String>, DscError> {
815815
/// * `process_name` - The name of the process
816816
/// * `process_id` - The ID of the process
817817
/// * `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
819819
{
820820
if !trace_line.is_empty()
821821
{
822822
if let Result::Ok(json_obj) = serde_json::from_str::<Value>(trace_line) {
823823
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());
825825
} 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());
827827
} 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());
829829
} 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());
831831
} 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());
833833
} else {
834834
// the line is a valid json, but not one of standard trace lines - return it as filtered stderr_line
835835
return trace_line;

0 commit comments

Comments
 (0)