From 446aa78d931359e1f798b6b9bb59c32dd8011d79 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:40:39 +0100 Subject: [PATCH] Remove redundant \n from critical log messages --- src/nchg/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nchg/main.cpp b/src/nchg/main.cpp index e691038..efca920 100644 --- a/src/nchg/main.cpp +++ b/src/nchg/main.cpp @@ -266,7 +266,7 @@ int main(int argc, char **argv) noexcept { return cli->exit(e); // This takes care of formatting and printing error // messages (if any) } catch (const std::bad_alloc &err) { - SPDLOG_CRITICAL("FAILURE! Unable to allocate enough memory: {}\n", err.what()); + SPDLOG_CRITICAL("FAILURE! Unable to allocate enough memory: {}", err.what()); return 1; } catch (const spdlog::spdlog_ex &e) { fmt::print(stderr, "FAILURE! NCHG encountered the following error while logging: {}\n", @@ -274,16 +274,16 @@ int main(int argc, char **argv) noexcept { return 1; } catch (const std::exception &e) { if (cli) { - SPDLOG_CRITICAL("FAILURE! NCHG {} encountered the following error: {}\n", + SPDLOG_CRITICAL("FAILURE! NCHG {} encountered the following error: {}", cli->get_printable_subcommand(), e.what()); } else { - SPDLOG_CRITICAL("FAILURE! NCHG encountered the following error: {}\n", e.what()); + SPDLOG_CRITICAL("FAILURE! NCHG encountered the following error: {}", e.what()); } return 1; } catch (...) { SPDLOG_CRITICAL( "FAILURE! NCHG encountered the following error: caught an unhandled exception!\n" - "If you see this message, please file an issue on GitHub.\n"); + "If you see this message, please file an issue on GitHub."); return 1; } return 0;