}
// Log part of a message. A series of calls to do_log_part must be followed by a call to do_log_commit.
-template <typename T> static void do_log_part(int idx, T arg) noexcept
+static void do_log_part(int idx, const char *arg) noexcept
{
if (log_current_line[idx]) {
int amount = sum_length(arg);
// It's not intended that methods in this namespace be called directly:
namespace dinit_log {
- template <typename A> static inline void log_parts(A a) noexcept
+ template <typename A> static inline void log_parts(const A &a) noexcept
{
log_msg_end(a);
}
- template <typename A, typename ...B> static inline void log_parts(A a, B... b) noexcept
+ template <typename A, typename ...B> static inline void log_parts(const A &a, const B & ...b) noexcept
{
log_msg_part(a);
log_parts(b...);
}
// Variadic 'log' method.
-template <typename A, typename ...B> static inline void log(loglevel_t lvl, bool log_cons, A a, B ...b) noexcept
-{
- log_msg_begin(lvl, a);
- dinit_log::log_parts(b...);
-}
-
-template <typename A, typename ...B> static inline void log(loglevel_t lvl, A a, B ...b) noexcept
+template <typename A, typename ...B> static inline void log(loglevel_t lvl, const A &a, const B & ...b) noexcept
{
log_msg_begin(lvl, a);
dinit_log::log_parts(b...);