From 757231cc6e777b8f4717d1467ef7efa01c7fde15 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Wed, 3 Jan 2018 17:41:16 +0000 Subject: Add the fmt library (#4065) * Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style. --- Tools/ProtoProxy/Connection.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Tools/ProtoProxy/Connection.h') diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index 2402e9f95..3b9127530 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -59,8 +59,12 @@ public: void Run(void); - void Log(const char * a_Format, ...); - void DataLog(const void * a_Data, size_t a_Size, const char * a_Format, ...); + void Log(const char * a_Format, fmt::ArgList); + FMT_VARIADIC(void, Log, const char *) + + void DataLog(const void * a_Data, size_t a_Size, const char * a_Format, fmt::ArgList); + FMT_VARIADIC(void, DataLog, const void *, size_t, const char *) + void LogFlush(void); protected: -- cgit v1.2.3