node: clean up logging

Do not print errors to stderr anymore if logger is not enabled
This commit is contained in:
Erik Kundt 2025-07-30 10:14:02 +02:00 committed by Fintan Halpenny
parent 174792813a
commit 54fd8c40a0
1 changed files with 1 additions and 5 deletions

View File

@ -140,11 +140,7 @@ fn main() {
}
if let Err(err) = execute() {
if log::log_enabled!(target: "node", log::Level::Error) {
log::error!(target: "node", "Fatal: {err:#}");
} else {
eprintln!("Error: {err:#}");
}
log::error!(target: "node", "{err:#}");
process::exit(1);
}
}