From f6c30a327a4cb0deeb04610d936ef2b4d4c80722 Mon Sep 17 00:00:00 2001 From: notplants Date: Thu, 28 Jul 2022 14:56:27 +0200 Subject: [PATCH] Remove debug statements --- peach-lib/src/sbot.rs | 4 ---- peach-web/src/utils/sbot.rs | 3 --- 2 files changed, 7 deletions(-) diff --git a/peach-lib/src/sbot.rs b/peach-lib/src/sbot.rs index ef391cd..457e094 100644 --- a/peach-lib/src/sbot.rs +++ b/peach-lib/src/sbot.rs @@ -65,7 +65,6 @@ impl SbotStatus { /// Retrieve statistics for the go-sbot systemd process by querying `systemctl`. pub fn read() -> Result { let system_manager = config_manager::get_config_value("SYSTEM_MANAGER")?; - info!("SYSTEM_MANAGER: {:?}", system_manager); match system_manager.as_str() { "systemd" => { SbotStatus::read_from_systemctl() @@ -81,17 +80,14 @@ impl SbotStatus { pub fn read_from_supervisorctl() -> Result { let mut status = SbotStatus::default(); - // TODO: implement this let info_output = Command::new("supervisorctl") .arg("status") .arg(config_manager::get_config_value("GO_SBOT_SERVICE")?) .output()?; - info!("info: {:?}", info_output); let service_info = std::str::from_utf8(&info_output.stdout)?; for line in service_info.lines() { - info!("line: {:?}", line); // example line // go-sbot RUNNING pid 11, uptime 0:04:23 if line.contains("RUNNING") { diff --git a/peach-web/src/utils/sbot.rs b/peach-web/src/utils/sbot.rs index 735330b..f704e75 100644 --- a/peach-web/src/utils/sbot.rs +++ b/peach-web/src/utils/sbot.rs @@ -29,7 +29,6 @@ use crate::{error::PeachWebError, utils::sbot}; /// This utility function calls the correct system calls based on these parameters. pub fn system_sbot_cmd(cmd: &str) -> Result { let system_manager = config_manager::get_config_value("SYSTEM_MANAGER")?; - info!("SYSTEM_MANAGER: {:?}", system_manager); match system_manager.as_str() { "systemd" => { let output = Command::new("sudo") @@ -55,12 +54,10 @@ pub fn system_sbot_cmd(cmd: &str) -> Result { Ok(output) } _ => { - info!("supervisorctl {:?} {:?}", cmd, config_manager::get_config_value("GO_SBOT_SERVICE")?); let output = Command::new("supervisorctl") .arg(cmd) .arg(config_manager::get_config_value("GO_SBOT_SERVICE")?) .output()?; - info!("logging: {:?}", output); Ok(output) } }