diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-02-04 00:37:08 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-02-04 00:37:08 +0100 |
commit | 3d5a45b283d2a59211f9e24f100b95169375213d (patch) | |
tree | 2180c31100324076f7ff862009190564c0296b58 /asl/log/log.cpp | |
parent | f2b1af8d3f23ff47b343cef8feef6e25ff5377e4 (diff) |
Add deref utilities & use them for log writer
Diffstat (limited to 'asl/log/log.cpp')
-rw-r--r-- | asl/log/log.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<asl::Writer*> 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> 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, |