diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-05-04 20:21:48 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-23 01:32:47 +0200 |
commit | 330626ab22fe2e87afa5306c5f4039088c41b49e (patch) | |
tree | 86a5c7e0f0eb34743d186cbd712d368fed16f748 /Tools | |
parent | Remove some unused inclusions (diff) | |
download | cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.gz cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.bz2 cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.lz cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.xz cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.zst cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.zip |
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/ProtoProxy/Connection.cpp | 14 | ||||
-rw-r--r-- | Tools/ProtoProxy/Connection.h | 4 |
2 files changed, 7 insertions, 11 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index 3049826b6..4c72c7097 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -10,8 +10,6 @@ #include "mbedTLS++/CryptoKey.h" #include "../../src/Logger.h" -#include "fmt/printf.h" - #ifdef _WIN32 #include <direct.h> // For _mkdir() #endif @@ -284,12 +282,12 @@ void cConnection::Run(void) -void cConnection::vLog(const char * a_Format, fmt::printf_args a_Args) +void cConnection::vLog(const char * a_Format, fmt::printf_args a_ArgList) { // Log to file: cCSLock Lock(m_CSLog); fmt::fprintf(m_LogFile, "[%5.3f] ", GetRelativeTime()); - fmt::vfprintf(m_LogFile, a_Format, a_Args); + fmt::vfprintf(m_LogFile, a_Format, a_ArgList); fmt::fprintf(m_LogFile, "\n"); #ifdef _DEBUG fflush(m_LogFile); @@ -303,7 +301,7 @@ void cConnection::vLog(const char * a_Format, fmt::printf_args a_Args) -void cConnection::vDataLog(const void * a_Data, size_t a_Size, const char * a_Format, fmt::printf_args a_Args) +void cConnection::vDataLog(const void * a_Data, size_t a_Size, const char * a_Format, fmt::printf_args a_ArgList) { AString Hex; CreateHexDump(Hex, a_Data, a_Size, 16); @@ -311,13 +309,11 @@ void cConnection::vDataLog(const void * a_Data, size_t a_Size, const char * a_Fo // Log to file: cCSLock Lock(m_CSLog); fmt::fprintf(m_LogFile, "[%5.3f] ", GetRelativeTime()); - fmt::vfprintf(m_LogFile, a_Format, a_Args); + fmt::vfprintf(m_LogFile, a_Format, a_ArgList); fmt::fprintf(m_LogFile, "\n%s\n", Hex); - /* // Log to screen: - std::cout << FullMsg; - //*/ + // std::cout << FullMsg; } diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index e52e1fa6d..6c13efba2 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -59,7 +59,7 @@ public: void Run(void); - void vLog(const char * a_Format, fmt::printf_args); + void vLog(const char * a_Format, fmt::printf_args a_ArgList); template <typename... Args> void Log(const char * a_Format, const Args & ... a_Args) @@ -67,7 +67,7 @@ public: vLog(a_Format, fmt::make_printf_args(a_Args...)); } - void vDataLog(const void * a_Data, size_t a_Size, const char * a_Format, fmt::printf_args); + void vDataLog(const void * a_Data, size_t a_Size, const char * a_Format, fmt::printf_args a_ArgList); template <typename... Args> void DataLog(const void * a_Data, size_t a_Size, const char * a_Format, const Args & ... a_Args) |