From 108a052f23d701284be8024084c975f734e0e3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ag=C3=BCero?= Date: Tue, 27 Aug 2024 23:23:00 +0200 Subject: [PATCH] Logger updates (#139) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * No EOL, no flush, no register in Loggers Signed-off-by: Carlos Agüero --- log/src/Logger.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/log/src/Logger.cc b/log/src/Logger.cc index 340693a..e28ec39 100644 --- a/log/src/Logger.cc +++ b/log/src/Logger.cc @@ -61,8 +61,10 @@ Logger::Logger(const std::string &_loggerName) this->dataPtr->logger->set_level(spdlog::level::err); this->dataPtr->logger->flush_on(spdlog::level::err); - spdlog::flush_every(std::chrono::seconds(5)); - spdlog::register_logger(this->dataPtr->logger); + // Disable eol. + auto f = std::make_unique( + "%+", spdlog::pattern_time_type::local, std::string("")); + this->dataPtr->logger->set_formatter(std::move(f)); } /////////////////////////////////////////////////