Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions include/log/catalog/mipi_encoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ struct log_handler {

template <logging::level Level, typename StringType>
CIB_ALWAYS_INLINE auto log_msg(StringType msg) -> void {
msg.args.apply([&](auto... args) {
using Message = message<Level, StringType>;
dispatch_message<Level>(catalog<Message>(),
static_cast<std::uint32_t>(args)...);
});
using Message = message<Level, StringType>;
if constexpr (requires { msg.args; }) {
msg.args.apply([&](auto... args) {
dispatch_message<Level>(catalog<Message>(),
static_cast<std::uint32_t>(args)...);
});
} else {
dispatch_message<Level>(catalog<Message>());
}
}

private:
Expand Down
10 changes: 7 additions & 3 deletions include/log/fmt/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ template <typename TDestinations> struct log_handler {
[&](auto &out) {
::fmt::format_to(out, "{:>8}us {}: ", currentTime,
level_constant<L>{});
msg.args.apply([&](auto const &...args) {
::fmt::format_to(out, MsgType::str.value, args...);
});
if constexpr (requires { msg.args; }) {
msg.args.apply([&](auto const &...args) {
::fmt::format_to(out, MsgType::str.value, args...);
});
} else {
::fmt::format_to(out, MsgType::value);
}
*out = '\n';
},
dests);
Expand Down
94 changes: 0 additions & 94 deletions include/sc/detail/format_spec.hpp

This file was deleted.

Loading