mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 12:45:47 +01:00
Print on stderr instead of stdout
...stdout is already taken by remoc ;)
This commit is contained in:
parent
87a25cf04c
commit
41b8a661d2
2 changed files with 9 additions and 8 deletions
|
|
@ -219,13 +219,13 @@ impl Set {
|
|||
}))
|
||||
.await
|
||||
{
|
||||
println!(
|
||||
eprintln!(
|
||||
"ERROR while removing {version} set {set} from chain {chain}: {err}"
|
||||
);
|
||||
}
|
||||
}
|
||||
if let Err(err) = ipset.order(Order::DestroySet(set.clone())).await {
|
||||
println!("ERROR while destroying {version} set {set}: {err}");
|
||||
eprintln!("ERROR while destroying {version} set {set}: {err}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -294,18 +294,19 @@ impl Action {
|
|||
Some(Ok(None)) => break,
|
||||
// error from channel
|
||||
Some(Err(err)) => {
|
||||
println!("ERROR {err}");
|
||||
eprintln!("ERROR {err}");
|
||||
break;
|
||||
}
|
||||
// ok
|
||||
Some(Ok(Some(exec))) => {
|
||||
if let Err(err) = self.handle_exec(exec).await {
|
||||
println!("ERROR {err}");
|
||||
eprintln!("ERROR {err}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
eprintln!("DEBUG Asking for shutdown");
|
||||
self.shutdown.ask_shutdown();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ impl IPsetManager {
|
|||
version,
|
||||
timeout,
|
||||
}) => {
|
||||
println!("INFO creating {version} set {name}");
|
||||
eprintln!("INFO creating {version} set {name}");
|
||||
let mut session: Session<HashNet> = Session::new(name.clone());
|
||||
session
|
||||
.create(|builder| {
|
||||
|
|
@ -145,7 +145,7 @@ impl IPsetManager {
|
|||
}
|
||||
Order::DestroySet(set) => {
|
||||
if let Some(mut session) = self.sessions.remove(&set) {
|
||||
println!("INFO destroying {} set {set}", session.version);
|
||||
eprintln!("INFO destroying {} set {set}", session.version);
|
||||
session
|
||||
.session
|
||||
.destroy()
|
||||
|
|
@ -196,9 +196,9 @@ impl IPsetManager {
|
|||
.version;
|
||||
|
||||
if insert {
|
||||
println!("INFO inserting {version} set {set} in chain {chain}");
|
||||
eprintln!("INFO inserting {version} set {set} in chain {chain}");
|
||||
} else {
|
||||
println!("INFO removing {version} set {set} from chain {chain}");
|
||||
eprintln!("INFO removing {version} set {set} from chain {chain}");
|
||||
}
|
||||
|
||||
let command = match version {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue