Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG

--HG--
branch : trunk
This commit is contained in:
click committed 2010-08-22 01:57:04 +02:00
1 parent a40cb46e61
commit 670964803f
29 files changed
+171 -171

No files matched your search

+12
View File
@@ -734,6 +734,18 @@ void Log::outDebug(const char * str, ...)
fflush(stdout);
}
void Log::outStaticDebug(const char * fmt, ...)
{
#ifdef TRINITY_DEBUG
va_list ap;
char str[2048];
va_start(ap, str);
vsnprintf(str, 2048, fmt, ap);
va_end(ap);
outDebug(str);
#endif
}
void Log::outStringInLine(const char * str, ...)
{
if (!str)
+1 -6
View File
@@ -104,6 +104,7 @@ class Log
void outBasic( const char * str, ... ) ATTR_PRINTF(2,3);
void outDetail( const char * str, ... ) ATTR_PRINTF(2,3);
void outDebug( const char * str, ... ) ATTR_PRINTF(2,3);
void outStaticDebug( const char * str, ... ) ATTR_PRINTF(2,3);
void outDebugInLine( const char * str, ... ) ATTR_PRINTF(2,3);
void outErrorDb( const char * str, ... ) ATTR_PRINTF(2,3);
void outChar( const char * str, ... ) ATTR_PRINTF(2,3);
@@ -174,11 +175,5 @@ class Log
#define sLog (*ACE_Singleton<Log, ACE_Thread_Mutex>::instance())
#ifdef TRINITY_DEBUG
#define DEBUG_LOG sLog.outDebug
#else
#define DEBUG_LOG
#endif
#endif