summaryrefslogtreecommitdiffstats
path: root/src/Logger.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-05-05 23:52:14 +0200
committerGitHub <noreply@github.com>2020-05-05 23:52:14 +0200
commit57952505e522be868a5a8270d8670163b55ebade (patch)
treecf3c5544612b8a51075b498fa14dba8fe758d656 /src/Logger.h
parentRequire semi-colon at end of function-like macros (#4719) (diff)
downloadcuberite-57952505e522be868a5a8270d8670163b55ebade.tar
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.gz
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.bz2
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.lz
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.xz
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.zst
cuberite-57952505e522be868a5a8270d8670163b55ebade.zip
Diffstat (limited to 'src/Logger.h')
-rw-r--r--src/Logger.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Logger.h b/src/Logger.h
index 14c02d825..e6c4460fa 100644
--- a/src/Logger.h
+++ b/src/Logger.h
@@ -59,12 +59,20 @@ public:
};
/** Log a message formatted with a printf style formatting string. */
- void LogPrintf(const char * a_Format, eLogLevel a_LogLevel, fmt::ArgList a_ArgList);
- FMT_VARIADIC(void, LogPrintf, const char *, eLogLevel)
+ void vLogPrintf(const char * a_Format, eLogLevel a_LogLevel, fmt::printf_args a_ArgList);
+ template <typename... Args>
+ void LogPrintf(const char * a_Format, eLogLevel a_LogLevel, const Args & ... args)
+ {
+ vLogPrintf(a_Format, a_LogLevel, fmt::make_printf_args(args...));
+ }
/** Log a message formatted with a python style formatting string. */
- void LogFormat(const char * a_Format, eLogLevel a_LogLevel, fmt::ArgList a_ArgList);
- FMT_VARIADIC(void, LogFormat, const char *, eLogLevel)
+ void vLogFormat(const char * a_Format, eLogLevel a_LogLevel, fmt::format_args a_ArgList);
+ template <typename... Args>
+ void LogFormat(const char * a_Format, eLogLevel a_LogLevel, const Args & ... args)
+ {
+ vLogFormat(a_Format, a_LogLevel, fmt::make_format_args(args...));
+ }
/** Logs the simple text message at the specified log level. */
void LogSimple(AString a_Message, eLogLevel a_LogLevel = llRegular);