From 7f587a1b6dc802b4797254b6fb5d1d38837aba04 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Mon, 18 Aug 2025 16:40:02 +0200 Subject: [PATCH] test: log timestamps in test logger --- test/test_logger.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_logger.h b/test/test_logger.h index 955ae3c3..37dead8d 100644 --- a/test/test_logger.h +++ b/test/test_logger.h @@ -66,9 +66,10 @@ class test_logger : public ::dwarfs::logger { void write(level_type level, std::string_view output, source_location loc) override { if (output_ && level <= output_threshold_) { + auto const t = get_current_time_string(); std::lock_guard lock(mx_); - std::cerr << level_char(level) << " [" << loc.file_name() << ":" - << loc.line() << "] " << output << "\n"; + std::cerr << level_char(level) << ' ' << t << " [" << loc.file_name() + << ":" << loc.line() << "] " << output << "\n"; } if (level <= threshold_) {