Commit 150f984c authored by captainwong's avatar captainwong

back to xi'an

parent 6daadc03
...@@ -200,7 +200,7 @@ namespace jlib ...@@ -200,7 +200,7 @@ namespace jlib
} }
} }
static void WriteLog(const TCHAR* format, ...) /*static void WriteLog(const TCHAR* format, ...)
{ {
try { try {
CLog* plog = CLog::GetInstance(); CLog* plog = CLog::GetInstance();
...@@ -212,7 +212,7 @@ namespace jlib ...@@ -212,7 +212,7 @@ namespace jlib
p = buf; p = buf;
va_list args; va_list args;
va_start(args, format); va_start(args, format);
p += _vsntprintf_s(p, sizeof(buf) - 1, sizeof(buf) - 1, format, args); p += _vsntprintf_s(p, MAX_OUTPUT_LEN - 1, MAX_OUTPUT_LEN - 1, format, args);
va_end(args); va_end(args);
while ((p > buf) && _istspace(*(p - 1))) while ((p > buf) && _istspace(*(p - 1)))
*--p = _T('\0'); *--p = _T('\0');
...@@ -225,7 +225,7 @@ namespace jlib ...@@ -225,7 +225,7 @@ namespace jlib
} catch (...) { } catch (...) {
assert(0); assert(0);
} }
} }*/
static void WriteLogW(const wchar_t* format, ...) static void WriteLogW(const wchar_t* format, ...)
{ {
...@@ -239,7 +239,7 @@ namespace jlib ...@@ -239,7 +239,7 @@ namespace jlib
p = buf; p = buf;
va_list args; va_list args;
va_start(args, format); va_start(args, format);
p += _vsnwprintf_s(p, sizeof(buf) - 1, sizeof(buf) - 1, format, args); p += _vsnwprintf_s(p, MAX_OUTPUT_LEN - 1, MAX_OUTPUT_LEN - 1, format, args);
va_end(args); va_end(args);
while ((p > buf) && iswspace(*(p - 1))) while ((p > buf) && iswspace(*(p - 1)))
*--p = '\0'; *--p = '\0';
...@@ -280,7 +280,7 @@ namespace jlib ...@@ -280,7 +280,7 @@ namespace jlib
p = buf; p = buf;
va_list args; va_list args;
va_start(args, format); va_start(args, format);
p += _vsnprintf_s(p, sizeof(buf) - 1, sizeof(buf) - 1, format, args); p += _vsnprintf_s(p, MAX_OUTPUT_LEN - 1, MAX_OUTPUT_LEN - 1, format, args);
va_end(args); va_end(args);
while ((p > buf) && _istspace(*(p - 1))) while ((p > buf) && _istspace(*(p - 1)))
*--p = '\0'; *--p = '\0';
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "observer_macro.h" #include "observer_macro.h"
namespace jlib { namespace jlib {
#define JLOG CLog::WriteLog #define JLOG CLog::WriteLogW
#define JLOGA CLog::WriteLogA #define JLOGA CLog::WriteLogA
#define JLOGW CLog::WriteLogW #define JLOGW CLog::WriteLogW
#define JLOGB(b, l) CLog::Dump(b, l) #define JLOGB(b, l) CLog::Dump(b, l)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment