fix: logs now actually get printed when using 'swap logs'

This commit is contained in:
Einliterflasche 2024-08-19 16:12:39 +02:00
parent a99d9ba7f4
commit cccbba0db2
2 changed files with 4 additions and 2 deletions

View File

@ -663,9 +663,12 @@ impl Request {
}
Method::Logs { logs_dir, redact, swap_id } => {
let dir = logs_dir.unwrap_or(context.config.data_dir.join("logs"));
let logs = get_logs(dir, swap_id, redact).await?;
for msg in &logs {
println!("{msg}");
}
Ok(json!({ "logs": logs }))
}
Method::GetRawStates => {

View File

@ -111,7 +111,6 @@ where
let request = Request::new(Method::Logs { logs_dir, redact, swap_id });
let context = Context::build(None, None, None, data, is_testnet, debug, json, None).await?;
println!("here");
(context, request)
}
CliCommand::Config => {