From 48c38f4282fc11989b82aab232960a9c04f97264 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 23 Apr 2018 17:44:49 -0700 Subject: [PATCH] ircd::log: Add logf to complement vlog. --- include/ircd/logger.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/ircd/logger.h b/include/ircd/logger.h index 69fd4d041..e26ebbec2 100644 --- a/include/ircd/logger.h +++ b/include/ircd/logger.h @@ -29,6 +29,7 @@ namespace ircd::log struct log; struct vlog; + struct logf; struct mark; struct console_quiet; @@ -122,6 +123,15 @@ struct ircd::log::vlog vlog(const log &log, const facility &, const char *const &fmt, const va_rtti &ap); }; +struct ircd::log::logf +{ + template + logf(const log &log, const facility &facility, const char *const &fmt, args&&... a) + { + vlog(log, facility, fmt, va_rtti{std::forward(a)...}); + } +}; + struct ircd::log::mark { mark(const facility &, const string_view &msg = {});