myc

Self-custodial remote signer for Radroots apps
git clone https://radroots.dev/git/myc.git
Log | Files | Refs | README | LICENSE

commit 1e494bcc07875cfce2e028bf7529ef36a5919cbe
parent b12ea6aadc3561d99bd131e89a373c693b888f8b
Author: triesap <tyson@radroots.org>
Date:   Fri, 17 Jul 2026 22:29:03 +0000

build: align logging with the pinned library

- refresh the standalone lock for the current log dependency graph
- adopt stable bounded file logging required by radroots_log
- retain configurable filters, output directories, and stdout behavior
- verify library and real process logging paths

Diffstat:
MCargo.lock | 1+
Msrc/logging.rs | 19++++++++++---------
Mtests/logging_run.rs | 7++++---
3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -1914,6 +1914,7 @@ name = "radroots_log" version = "0.1.0-alpha.2" dependencies = [ "chrono", + "serde_json", "thiserror 1.0.69", "tracing", "tracing-appender", diff --git a/src/logging.rs b/src/logging.rs @@ -5,10 +5,11 @@ use radroots_log::{LogFileLayout, LoggingOptions}; pub fn init_logging(config: &MycLoggingConfig) -> Result<(), MycError> { radroots_log::init_logging(LoggingOptions { dir: config.output_dir.clone(), - file_name: "log".to_owned(), + file_name: "myc.log".to_owned(), stdout: config.stdout, default_level: Some(config.filter.clone()), - file_layout: LogFileLayout::DatedFileName, + file_layout: LogFileLayout::StableFileName, + ..LoggingOptions::default() }) .map_err(|source| MycError::InvalidOperation(format!("failed to initialize logging: {source}"))) } @@ -45,7 +46,7 @@ MYC_TRANSPORT_CONNECT_TIMEOUT_SECS=10 } #[test] - fn logging_options_resolve_real_dated_file_path() { + fn logging_options_resolve_bounded_stable_file_path() { let config = MycConfig::from_env_str( r#" MYC_LOGGING_FILTER=info,myc=debug @@ -63,10 +64,11 @@ MYC_TRANSPORT_CONNECT_TIMEOUT_SECS=10 let path = LoggingOptions { dir: config.logging.output_dir.clone(), - file_name: "log".to_owned(), + file_name: "myc.log".to_owned(), stdout: config.logging.stdout, default_level: Some(config.logging.filter.clone()), - file_layout: LogFileLayout::DatedFileName, + file_layout: LogFileLayout::StableFileName, + ..LoggingOptions::default() } .resolved_current_log_file_path() .expect("resolved log path"); @@ -75,10 +77,9 @@ MYC_TRANSPORT_CONNECT_TIMEOUT_SECS=10 path.parent(), Some(PathBuf::from("/tmp/myc-logs").as_path()) ); - assert!( - path.file_name() - .and_then(|value| value.to_str()) - .is_some_and(|value| value.ends_with(".log")) + assert_eq!( + path.file_name().and_then(|value| value.to_str()), + Some("myc.log") ); } } diff --git a/tests/logging_run.rs b/tests/logging_run.rs @@ -44,7 +44,7 @@ fn kill_child(child: &mut Child) { } #[test] -fn myc_run_writes_non_empty_dated_log_file() { +fn myc_run_writes_non_empty_bounded_log_file() { let temp = tempfile::tempdir().expect("tempdir"); let state_dir = temp.path().join("state"); let logs_dir = temp.path().join("logs"); @@ -84,10 +84,11 @@ MYC_TRANSPORT_CONNECT_TIMEOUT_SECS=10\n", let expected_log_path = LoggingOptions { dir: Some(logs_dir.clone()), - file_name: "log".to_owned(), + file_name: "myc.log".to_owned(), stdout: false, default_level: Some("info,myc=info".to_owned()), - file_layout: LogFileLayout::DatedFileName, + file_layout: LogFileLayout::StableFileName, + ..LoggingOptions::default() } .resolved_current_log_file_path() .expect("resolved current log path");