From 3fa3c8b09897c63efa8ad55243a95ee3eff5e75e Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 11 Aug 2009 10:53:29 -0500 Subject: *Add function Unit::OutDebugInfo for debug. --HG-- branch : trunk --- src/shared/Log.cpp | 16 ++++++++++++++++ src/shared/Log.h | 1 + 2 files changed, 17 insertions(+) (limited to 'src/shared') diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index 8dc23066245..117eabffb4a 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -702,6 +702,22 @@ void Log::outDebug( const char * str, ... ) fflush(stdout); } +void Log::outStringInLine( const char * str, ... ) +{ + if( !str ) + return; + + UTF8PRINTF(stdout,str,); + + if(logfile) + { + va_list ap; + va_start(ap, str); + vfprintf(logfile, str, ap); + va_end(ap); + } +} + void Log::outCommand( uint32 account, const char * str, ... ) { if( !str ) diff --git a/src/shared/Log.h b/src/shared/Log.h index b3fb9f00b2e..40f09e4b29e 100644 --- a/src/shared/Log.h +++ b/src/shared/Log.h @@ -98,6 +98,7 @@ class Log : public Trinity::Singleton