summaryrefslogtreecommitdiffstats
path: root/src/Log.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-15 22:41:45 +0100
committerMattes D <github@xoft.cz>2014-01-15 22:41:45 +0100
commit4974bf2832b874279fbf6fcca28ca5d6984025b9 (patch)
tree83323f2103745cea670cc9a04ca182ed9c8db55e /src/Log.cpp
parentProtoProxy: use CMake to generate the MSVC project files. (diff)
parentFixed ProtoProxy compilation. (diff)
downloadcuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.tar
cuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.tar.gz
cuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.tar.bz2
cuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.tar.lz
cuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.tar.xz
cuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.tar.zst
cuberite-4974bf2832b874279fbf6fcca28ca5d6984025b9.zip
Diffstat (limited to '')
-rw-r--r--src/Log.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Log.cpp b/src/Log.cpp
index a0de4531b..8f811f14f 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -99,10 +99,10 @@ void cLog::ClearLog()
-void cLog::Log(const char * a_Format, va_list argList)
+void cLog::Log(const char * a_Format, va_list argList, va_list argListCopy)
{
AString Message;
- AppendVPrintf(Message, a_Format, argList);
+ AppendVPrintf(Message, a_Format, argList, argListCopy);
time_t rawtime;
time ( &rawtime );
@@ -147,11 +147,13 @@ void cLog::Log(const char * a_Format, va_list argList)
-void cLog::Log(const char* a_Format, ...)
+void cLog::Log(const char * a_Format, ...)
{
- va_list argList;
+ va_list argList, argListCopy;
va_start(argList, a_Format);
- Log( a_Format, argList );
+ va_start(argListCopy, a_Format);
+ Log(a_Format, argList, argListCopy);
+ va_end(argListCopy);
va_end(argList);
}
@@ -159,9 +161,9 @@ void cLog::Log(const char* a_Format, ...)
-void cLog::SimpleLog(const char* a_String)
+void cLog::SimpleLog(const char * a_String)
{
- Log("%s", a_String );
+ Log("%s", a_String);
}