From cbdb017fe2b4045d4bf0c554223f827888a44dd4 Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 25 Apr 2024 14:38:51 +0200 Subject: [PATCH 1/6] added logging directories with date --- Cargo.lock | 1 + Cargo.toml | 1 + src/logger.rs | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0d88f0..423e078 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -613,6 +613,7 @@ dependencies = [ "log", "mio", "num_enum", + "once_cell", "satrs", "satrs-mib", "serde", diff --git a/Cargo.toml b/Cargo.toml index 70493df..f0093c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ serde_json = "1" mio = "0.8" homedir = "0.2" socket2 = "0.5" +once_cell = "1.19" [dependencies.satrs] version = "0.2.0-rc.5" diff --git a/src/logger.rs b/src/logger.rs index c186deb..fe5914b 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -1,13 +1,17 @@ use std::path::{Path, PathBuf}; - +use once_cell::sync::OnceCell; use ops_sat_rs::config::LOG_FOLDER; +pub static LOGFILE_PATH: OnceCell = OnceCell::new(); + pub fn setup_logger() -> Result<(), fern::InitError> { if !Path::new(LOG_FOLDER).exists() && std::fs::create_dir_all(LOG_FOLDER).is_err() { eprintln!("Failed to create log folder '{}'", LOG_FOLDER); } let mut path_buf = PathBuf::from(LOG_FOLDER); - path_buf.push("output.log"); + path_buf.push(format!("output_{}.log", humantime::format_rfc3339_seconds(std::time::SystemTime::now()).to_string()).replace(":", "_")); + println!("Creating logfile {:?}", path_buf); + LOGFILE_PATH.set(path_buf.clone()).expect("Error setting global logfile path"); fern::Dispatch::new() .format(move |out, message, record| { out.finish(format_args!( -- 2.43.0 From eeba6fab4469115b8053812b3bc28a0423dc573b Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 25 Apr 2024 15:17:44 +0200 Subject: [PATCH 2/6] added low priority downlink folder and downlinking logs --- src/config.rs | 11 ++++++++++- src/controller.rs | 18 ++++++++++++++++-- src/main.rs | 15 +++++---------- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/config.rs b/src/config.rs index 30e0614..ec9912b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,7 +9,9 @@ use std::path::{Path, PathBuf}; pub const STOP_FILE_NAME: &str = "stop-experiment"; pub const CONFIG_FILE_NAME: &str = "exp278.toml"; -pub const HOME_FOLDER_EXPERIMENT: &str = "/home/exp278"; +pub const HOME_FOLDER_EXPERIMENT: &str = "/home/exp278"; // also where IMS-100 images are placed +pub const TO_GROUND_FOLDER_EXPERIMENT: &str = "/home/exp278/toGround"; +pub const TO_GROUND_LP_FOLDER_EXPERIMENT: &str = "/home/exp278/toGroundLP"; pub const LOG_FOLDER: &str = "logs"; pub const OBSW_SERVER_ADDR: Ipv4Addr = Ipv4Addr::UNSPECIFIED; @@ -291,3 +293,10 @@ pub mod tasks { pub const STOP_CHECK_FREQUENCY_MS: u64 = 400; pub const STOP_CHECK_FREQUENCY: Duration = Duration::from_millis(STOP_CHECK_FREQUENCY_MS); } + +pub fn create_low_priority_ground_dir() { + log::debug!("Creating low priority to ground directory"); + if !Path::new(TO_GROUND_LP_FOLDER_EXPERIMENT).exists() && std::fs::create_dir_all(TO_GROUND_LP_FOLDER_EXPERIMENT).is_err() { + log::error!("Failed to create low priority to ground directory '{}'", TO_GROUND_LP_FOLDER_EXPERIMENT); + } +} diff --git a/src/controller.rs b/src/controller.rs index 69c27c8..c1e5ae4 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -10,7 +10,8 @@ use std::{ sync::{atomic::AtomicBool, mpsc, Arc}, }; -use ops_sat_rs::config::{action_err::INVALID_ACTION_ID, HOME_PATH, STOP_FILE_NAME}; +use ops_sat_rs::config::{action_err::INVALID_ACTION_ID, HOME_PATH, STOP_FILE_NAME, TO_GROUND_FOLDER_EXPERIMENT}; +use crate::logger::LOGFILE_PATH; use crate::requests::CompositeRequest; @@ -18,6 +19,7 @@ use crate::requests::CompositeRequest; #[repr(u32)] pub enum ActionId { StopExperiment = 1, + DownlinkLogfile = 2, } pub struct ExperimentController { @@ -96,7 +98,19 @@ impl ExperimentController { ActionReplyVariant::Completed, )); if result.is_err() { - log::error!("sending action reply failed"); + log::error!("Sending action reply failed"); + } + } + ActionId::DownlinkLogfile => { + if let Some(logfile_path) = LOGFILE_PATH.get() { + if let Ok(logfile_path) = ::clone(logfile_path).into_os_string().into_string() { + let ground_folder_path = TO_GROUND_FOLDER_EXPERIMENT.to_string(); + if std::fs::copy(logfile_path.as_str(), ground_folder_path.as_str()).is_err() { + log::error!("Copying logfile into downlink path failed") + } + } + } else { + log::error!("Downlink path emtpy") } } } diff --git a/src/main.rs b/src/main.rs index af84c9d..0308b76 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,14 +5,8 @@ use std::{ time::Duration, }; -use log::info; -use ops_sat_rs::config::{ - cfg_file::create_app_config, - components::{CONTROLLER_ID, TCP_SERVER, TCP_SPP_CLIENT, UDP_SERVER}, - pool::create_sched_tc_pool, - tasks::{FREQ_MS_CAMERA_HANDLING, FREQ_MS_CTRL, FREQ_MS_PUS_STACK, STOP_CHECK_FREQUENCY}, - VALID_PACKET_ID_LIST, VERSION, -}; +use log::{debug, info}; +use ops_sat_rs::config::{cfg_file::create_app_config, components::{CONTROLLER_ID, TCP_SERVER, TCP_SPP_CLIENT, UDP_SERVER}, create_low_priority_ground_dir, pool::create_sched_tc_pool, tasks::{FREQ_MS_CAMERA_HANDLING, FREQ_MS_CTRL, FREQ_MS_PUS_STACK, STOP_CHECK_FREQUENCY}, VALID_PACKET_ID_LIST, VERSION}; use ops_sat_rs::config::{components::CAMERA_HANDLER, tasks::FREQ_MS_EVENT_HANDLING}; use ops_sat_rs::config::{tasks::FREQ_MS_UDP_TMTC, OBSW_SERVER_ADDR, SERVER_PORT}; use ops_sat_rs::TimeStampHelper; @@ -54,10 +48,11 @@ mod tmtc; fn main() { setup_logger().expect("setting up logging with fern failed"); let version_str = VERSION.unwrap_or("?"); - println!("OPS-SAT Rust Experiment OBSW v{}", version_str); + debug!("OPS-SAT Rust Experiment OBSW v{}", version_str); + create_low_priority_ground_dir(); let app_cfg = create_app_config(); - println!("App Configuration: {:?}", app_cfg); + debug!("App Configuration: {:?}", app_cfg); let stop_signal = Arc::new(AtomicBool::new(false)); -- 2.43.0 From df556acbf50e669903fe6936d29db4df95116e7b Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 25 Apr 2024 16:12:22 +0200 Subject: [PATCH 3/6] added moving images into downlink lp folder --- src/controller.rs | 49 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/src/controller.rs b/src/controller.rs index c1e5ae4..1ff00bc 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -9,8 +9,7 @@ use std::{ path::{Path, PathBuf}, sync::{atomic::AtomicBool, mpsc, Arc}, }; - -use ops_sat_rs::config::{action_err::INVALID_ACTION_ID, HOME_PATH, STOP_FILE_NAME, TO_GROUND_FOLDER_EXPERIMENT}; +use ops_sat_rs::config::{action_err::INVALID_ACTION_ID, HOME_FOLDER_EXPERIMENT, HOME_PATH, STOP_FILE_NAME, TO_GROUND_FOLDER_EXPERIMENT}; use crate::logger::LOGFILE_PATH; use crate::requests::CompositeRequest; @@ -20,6 +19,7 @@ use crate::requests::CompositeRequest; pub enum ActionId { StopExperiment = 1, DownlinkLogfile = 2, + DownlinkImages = 3, } pub struct ExperimentController { @@ -104,8 +104,7 @@ impl ExperimentController { ActionId::DownlinkLogfile => { if let Some(logfile_path) = LOGFILE_PATH.get() { if let Ok(logfile_path) = ::clone(logfile_path).into_os_string().into_string() { - let ground_folder_path = TO_GROUND_FOLDER_EXPERIMENT.to_string(); - if std::fs::copy(logfile_path.as_str(), ground_folder_path.as_str()).is_err() { + if std::fs::copy(logfile_path.as_str(), TO_GROUND_FOLDER_EXPERIMENT).is_err() { log::error!("Copying logfile into downlink path failed") } } @@ -113,6 +112,17 @@ impl ExperimentController { log::error!("Downlink path emtpy") } } + + // downlink images, default will be the last image, otherwise specified counting down (2 = second to last image, etc.) + ActionId::DownlinkImages => { + if let Ok(image_path) = get_latest_image() { + if let Ok(image_path) = ::clone(&image_path).into_os_string().into_string() { + if std::fs::copy(image_path, TO_GROUND_FOLDER_EXPERIMENT).is_err() { + log::error!("Copying logfile into downlink path failed") + } + } + } + } } } @@ -140,3 +150,34 @@ impl ExperimentController { check_at_path(self.home_path_stop_file.as_path()); } } + +// TODO this may very well cause everything to crash +pub fn get_latest_image() -> Result { + // Get the most recently modified file + if let Some(last_modified_file) = std::fs::read_dir(HOME_FOLDER_EXPERIMENT)? + .flatten() + .filter(|f| match f.metadata() { + Ok(metadata) => {metadata.is_file()} + Err(_) => {false} + }) + .filter(|f| match f.file_name().into_string(){ + Ok(name) => {name.ends_with(".png")} + Err(_) => {false} + }) + .max_by_key(|x| match x.metadata() { + Ok(metadata) => { + if let Ok(time) = metadata.modified() { + time + } else { + std::time::SystemTime::UNIX_EPOCH + } + } + Err(_) => { + std::time::SystemTime::UNIX_EPOCH + } + }) { + Ok(last_modified_file.path()) + } else { + Err(std::io::Error::other("No latest image found")) + } +} \ No newline at end of file -- 2.43.0 From 2566050b3bbb9ce401318e77358da06c8dffdd11 Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 25 Apr 2024 16:31:05 +0200 Subject: [PATCH 4/6] added get latest image function --- src/config.rs | 11 +++++-- src/controller.rs | 77 +++++++++++++++++++++++++++++------------------ src/logger.rs | 14 +++++++-- src/main.rs | 9 +++++- 4 files changed, 75 insertions(+), 36 deletions(-) diff --git a/src/config.rs b/src/config.rs index ec9912b..c4ccfe9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,7 +9,7 @@ use std::path::{Path, PathBuf}; pub const STOP_FILE_NAME: &str = "stop-experiment"; pub const CONFIG_FILE_NAME: &str = "exp278.toml"; -pub const HOME_FOLDER_EXPERIMENT: &str = "/home/exp278"; // also where IMS-100 images are placed +pub const HOME_FOLDER_EXPERIMENT: &str = "/home/exp278"; // also where IMS-100 images are placed pub const TO_GROUND_FOLDER_EXPERIMENT: &str = "/home/exp278/toGround"; pub const TO_GROUND_LP_FOLDER_EXPERIMENT: &str = "/home/exp278/toGroundLP"; pub const LOG_FOLDER: &str = "logs"; @@ -296,7 +296,12 @@ pub mod tasks { pub fn create_low_priority_ground_dir() { log::debug!("Creating low priority to ground directory"); - if !Path::new(TO_GROUND_LP_FOLDER_EXPERIMENT).exists() && std::fs::create_dir_all(TO_GROUND_LP_FOLDER_EXPERIMENT).is_err() { - log::error!("Failed to create low priority to ground directory '{}'", TO_GROUND_LP_FOLDER_EXPERIMENT); + if !Path::new(TO_GROUND_LP_FOLDER_EXPERIMENT).exists() + && std::fs::create_dir_all(TO_GROUND_LP_FOLDER_EXPERIMENT).is_err() + { + log::error!( + "Failed to create low priority to ground directory '{}'", + TO_GROUND_LP_FOLDER_EXPERIMENT + ); } } diff --git a/src/controller.rs b/src/controller.rs index 1ff00bc..67f4cf9 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -1,4 +1,10 @@ +use crate::logger::LOGFILE_PATH; use num_enum::TryFromPrimitive; +use ops_sat_rs::config::{ + action_err::INVALID_ACTION_ID, HOME_FOLDER_EXPERIMENT, HOME_PATH, STOP_FILE_NAME, + TO_GROUND_FOLDER_EXPERIMENT, +}; +use satrs::action::ActionRequestVariant; use satrs::{ action::ActionRequest, pus::action::{ActionReplyPus, ActionReplyVariant}, @@ -9,8 +15,6 @@ use std::{ path::{Path, PathBuf}, sync::{atomic::AtomicBool, mpsc, Arc}, }; -use ops_sat_rs::config::{action_err::INVALID_ACTION_ID, HOME_FOLDER_EXPERIMENT, HOME_PATH, STOP_FILE_NAME, TO_GROUND_FOLDER_EXPERIMENT}; -use crate::logger::LOGFILE_PATH; use crate::requests::CompositeRequest; @@ -103,9 +107,14 @@ impl ExperimentController { } ActionId::DownlinkLogfile => { if let Some(logfile_path) = LOGFILE_PATH.get() { - if let Ok(logfile_path) = ::clone(logfile_path).into_os_string().into_string() { - if std::fs::copy(logfile_path.as_str(), TO_GROUND_FOLDER_EXPERIMENT).is_err() { - log::error!("Copying logfile into downlink path failed") + if let Ok(logfile_path) = ::clone(logfile_path) + .into_os_string() + .into_string() + { + if std::fs::copy(logfile_path.as_str(), TO_GROUND_FOLDER_EXPERIMENT) + .is_err() + { + log::error!("Copying logfile into downlink path failed") } } } else { @@ -115,8 +124,17 @@ impl ExperimentController { // downlink images, default will be the last image, otherwise specified counting down (2 = second to last image, etc.) ActionId::DownlinkImages => { - if let Ok(image_path) = get_latest_image() { - if let Ok(image_path) = ::clone(&image_path).into_os_string().into_string() { + if let Ok(image_path) = match action_req.variant { + ActionRequestVariant::VecData(data) => { + let index = data[0]; + get_latest_image(index as usize) + } + _ => get_latest_image(0), + } { + if let Ok(image_path) = ::clone(&image_path) + .into_os_string() + .into_string() + { if std::fs::copy(image_path, TO_GROUND_FOLDER_EXPERIMENT).is_err() { log::error!("Copying logfile into downlink path failed") } @@ -151,33 +169,34 @@ impl ExperimentController { } } -// TODO this may very well cause everything to crash -pub fn get_latest_image() -> Result { +// TODO no idea if this works in any way shape or form +pub fn get_latest_image(index: usize) -> Result { // Get the most recently modified file - if let Some(last_modified_file) = std::fs::read_dir(HOME_FOLDER_EXPERIMENT)? + let mut png_files = std::fs::read_dir(HOME_FOLDER_EXPERIMENT)? .flatten() .filter(|f| match f.metadata() { - Ok(metadata) => {metadata.is_file()} - Err(_) => {false} + Ok(metadata) => metadata.is_file(), + Err(_) => false, }) - .filter(|f| match f.file_name().into_string(){ - Ok(name) => {name.ends_with(".png")} - Err(_) => {false} + .filter(|f| match f.file_name().into_string() { + Ok(name) => name.ends_with(".png"), + Err(_) => false, }) - .max_by_key(|x| match x.metadata() { - Ok(metadata) => { - if let Ok(time) = metadata.modified() { - time - } else { - std::time::SystemTime::UNIX_EPOCH - } - } - Err(_) => { + .collect::>(); + png_files.sort_by_key(|x| match x.metadata() { + Ok(metadata) => { + if let Ok(time) = metadata.modified() { + time + } else { std::time::SystemTime::UNIX_EPOCH } - }) { - Ok(last_modified_file.path()) - } else { - Err(std::io::Error::other("No latest image found")) + } + Err(_) => std::time::SystemTime::UNIX_EPOCH, + }); + + png_files.reverse(); + if let Some(png) = png_files.into_iter().nth(index) { + return Ok(png.path()); } -} \ No newline at end of file + Err(std::io::Error::other("No latest image found")) +} diff --git a/src/logger.rs b/src/logger.rs index fe5914b..f502ac1 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -1,6 +1,6 @@ -use std::path::{Path, PathBuf}; use once_cell::sync::OnceCell; use ops_sat_rs::config::LOG_FOLDER; +use std::path::{Path, PathBuf}; pub static LOGFILE_PATH: OnceCell = OnceCell::new(); @@ -9,9 +9,17 @@ pub fn setup_logger() -> Result<(), fern::InitError> { eprintln!("Failed to create log folder '{}'", LOG_FOLDER); } let mut path_buf = PathBuf::from(LOG_FOLDER); - path_buf.push(format!("output_{}.log", humantime::format_rfc3339_seconds(std::time::SystemTime::now()).to_string()).replace(":", "_")); + path_buf.push( + format!( + "output_{}.log", + humantime::format_rfc3339_seconds(std::time::SystemTime::now()).to_string() + ) + .replace(":", "_"), + ); println!("Creating logfile {:?}", path_buf); - LOGFILE_PATH.set(path_buf.clone()).expect("Error setting global logfile path"); + LOGFILE_PATH + .set(path_buf.clone()) + .expect("Error setting global logfile path"); fern::Dispatch::new() .format(move |out, message, record| { out.finish(format_args!( diff --git a/src/main.rs b/src/main.rs index 0308b76..f3218ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,14 @@ use std::{ }; use log::{debug, info}; -use ops_sat_rs::config::{cfg_file::create_app_config, components::{CONTROLLER_ID, TCP_SERVER, TCP_SPP_CLIENT, UDP_SERVER}, create_low_priority_ground_dir, pool::create_sched_tc_pool, tasks::{FREQ_MS_CAMERA_HANDLING, FREQ_MS_CTRL, FREQ_MS_PUS_STACK, STOP_CHECK_FREQUENCY}, VALID_PACKET_ID_LIST, VERSION}; +use ops_sat_rs::config::{ + cfg_file::create_app_config, + components::{CONTROLLER_ID, TCP_SERVER, TCP_SPP_CLIENT, UDP_SERVER}, + create_low_priority_ground_dir, + pool::create_sched_tc_pool, + tasks::{FREQ_MS_CAMERA_HANDLING, FREQ_MS_CTRL, FREQ_MS_PUS_STACK, STOP_CHECK_FREQUENCY}, + VALID_PACKET_ID_LIST, VERSION, +}; use ops_sat_rs::config::{components::CAMERA_HANDLER, tasks::FREQ_MS_EVENT_HANDLING}; use ops_sat_rs::config::{tasks::FREQ_MS_UDP_TMTC, OBSW_SERVER_ADDR, SERVER_PORT}; use ops_sat_rs::TimeStampHelper; -- 2.43.0 From 279fa42f313d2df2f3391a4fc1c21fc7d8a7b136 Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 25 Apr 2024 16:50:08 +0200 Subject: [PATCH 5/6] added commander actions for logfile and image downlink --- pytmtc/opssat_tmtc/pus_tc.py | 23 ++++++++++++++++++++++- src/config.rs | 2 +- src/controller.rs | 2 ++ src/handlers/camera.rs | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/pytmtc/opssat_tmtc/pus_tc.py b/pytmtc/opssat_tmtc/pus_tc.py index 49bbc71..f24fa6b 100644 --- a/pytmtc/opssat_tmtc/pus_tc.py +++ b/pytmtc/opssat_tmtc/pus_tc.py @@ -96,6 +96,16 @@ def create_cmd_definition_tree() -> CmdTreeNode: CmdTreeNode("custom_params", "Custom Camera Parameters as specified from file") ) action_node.add_child(cam_node) + + controller_node = CmdTreeNode("controller", "Main OBSW Controller") + controller_node.add_child( + CmdTreeNode("downlink_logs", "Downlink Logs via toGround folder") + ) + controller_node.add_child( + CmdTreeNode("downlink_last_img", "Downlink last image via toGroundLP folder") + ) + action_node.add_child(controller_node) + root_node.add_child(action_node) return root_node @@ -157,7 +167,18 @@ def pack_pus_telecommands(q: DefaultPusQueueHelper, cmd_path: str): service=8, subservice=128, apid=EXPERIMENT_APID, app_data=data ) ) - + if cmd_path_list[1] == "controller": + assert len(cmd_path_list) >= 3 + data = bytearray() + if cmd_path_list[2] == "downlink_logs": + data.extend(make_action_cmd_header(UniqueId.Controller, 2)) + if cmd_path_list[2] == "downlink_last_img": + data.extend(make_action_cmd_header(UniqueId.Controller, 3)) + return q.add_pus_tc( + PusTelecommand( + service=8, subservice=128, apid=EXPERIMENT_APID, app_data=data + ) + ) def handle_set_mode_cmd( q: DefaultPusQueueHelper, target_str: str, mode_str: str, apid: int, unique_id: int diff --git a/src/config.rs b/src/config.rs index c4ccfe9..c8c08ab 100644 --- a/src/config.rs +++ b/src/config.rs @@ -295,7 +295,7 @@ pub mod tasks { } pub fn create_low_priority_ground_dir() { - log::debug!("Creating low priority to ground directory"); + log::info!("Creating low priority to ground directory"); if !Path::new(TO_GROUND_LP_FOLDER_EXPERIMENT).exists() && std::fs::create_dir_all(TO_GROUND_LP_FOLDER_EXPERIMENT).is_err() { diff --git a/src/controller.rs b/src/controller.rs index 67f4cf9..7f5a6cc 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -106,6 +106,7 @@ impl ExperimentController { } } ActionId::DownlinkLogfile => { + log::info!("Copying logfile into downlink folder"); if let Some(logfile_path) = LOGFILE_PATH.get() { if let Ok(logfile_path) = ::clone(logfile_path) .into_os_string() @@ -124,6 +125,7 @@ impl ExperimentController { // downlink images, default will be the last image, otherwise specified counting down (2 = second to last image, etc.) ActionId::DownlinkImages => { + log::info!("Copying images into low priority downlink folder"); if let Ok(image_path) = match action_req.variant { ActionRequestVariant::VecData(data) => { let index = data[0]; diff --git a/src/handlers/camera.rs b/src/handlers/camera.rs index d136856..0897f7b 100644 --- a/src/handlers/camera.rs +++ b/src/handlers/camera.rs @@ -291,7 +291,7 @@ impl IMS100BatchHandler { }, }; let output = self.take_picture(param)?; - debug!("Sending action reply!"); + info!("Sending action reply!"); send_data_reply(self.id, output.stdout, &self.stamp_helper, &self.tm_tx)?; self.action_reply_tx .send(GenericMessage::new( -- 2.43.0 From f8f3bc73ac00f0ab6bab6376ba4a2c1a03c72a7e Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 25 Apr 2024 17:48:44 +0200 Subject: [PATCH 6/6] added minor logging changes --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f3218ef..40ab124 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,11 +55,11 @@ mod tmtc; fn main() { setup_logger().expect("setting up logging with fern failed"); let version_str = VERSION.unwrap_or("?"); - debug!("OPS-SAT Rust Experiment OBSW v{}", version_str); + println!("OPS-SAT Rust Experiment OBSW v{}", version_str); create_low_priority_ground_dir(); let app_cfg = create_app_config(); - debug!("App Configuration: {:?}", app_cfg); + info!("App Configuration: {:?}", app_cfg); let stop_signal = Arc::new(AtomicBool::new(false)); -- 2.43.0