From 3d5a45b283d2a59211f9e24f100b95169375213d Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Tue, 4 Feb 2025 00:37:08 +0100 Subject: Add deref utilities & use them for log writer --- asl/log/log.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'asl/log/log.cpp') diff --git a/asl/log/log.cpp b/asl/log/log.cpp index cd5d287..af31a84 100644 --- a/asl/log/log.cpp +++ b/asl/log/log.cpp @@ -4,7 +4,7 @@ // @Todo Don't use internal get_stdout_writer, make console module -static asl::log::DefaultLogger g_default_logger{asl::print_internals::get_stdout_writer()}; +static asl::log::DefaultLogger g_default_logger{asl::print_internals::get_stdout_writer()}; static asl::log::Logger* g_head = &g_default_logger; static constexpr asl::string_view kLevelName[] = { @@ -20,9 +20,9 @@ void asl::log::register_logger(box logger_box) logger->m_next = exchange(g_head, logger); } -void asl::log::DefaultLogger::log(const message& msg) +void asl::log::DefaultLoggerBase::log_inner(Writer& writer, const message& msg) { - asl::format(m_writer, "[{}] {}:{}: {}\n", + asl::format(&writer, "[{}] {}:{}: {}\n", kLevelName[msg.level], // NOLINT msg.location.file, msg.location.line, -- cgit