@ -88,7 +88,7 @@ map<string, string> mapArgs;
map < string , vector < string > > mapMultiArgs ;
map < string , vector < string > > mapMultiArgs ;
bool fDebug = false ;
bool fDebug = false ;
bool fPrintToConsole = false ;
bool fPrintToConsole = false ;
bool fPrintToDebug ger = fals e;
bool fPrintToDebug Log = tru e;
bool fDaemon = false ;
bool fDaemon = false ;
bool fServer = false ;
bool fServer = false ;
string strMiscWarning ;
string strMiscWarning ;
@ -270,7 +270,7 @@ int LogPrint(const char* category, const char* pszFormat, ...)
ret + = vprintf ( pszFormat , arg_ptr ) ;
ret + = vprintf ( pszFormat , arg_ptr ) ;
va_end ( arg_ptr ) ;
va_end ( arg_ptr ) ;
}
}
else if ( ! fPrintToDebug ger )
else if ( fPrintToDebug Lo g)
{
{
static bool fStartedNewLine = true ;
static bool fStartedNewLine = true ;
boost : : call_once ( & DebugPrintInit , debugPrintInitFlag ) ;
boost : : call_once ( & DebugPrintInit , debugPrintInitFlag ) ;
@ -302,29 +302,6 @@ int LogPrint(const char* category, const char* pszFormat, ...)
va_end ( arg_ptr ) ;
va_end ( arg_ptr ) ;
}
}
# ifdef WIN32
if ( fPrintToDebugger )
{
// accumulate and output a line at a time
static std : : string buffer ;
boost : : mutex : : scoped_lock scoped_lock ( * mutexDebugLog ) ;
va_list arg_ptr ;
va_start ( arg_ptr , pszFormat ) ;
buffer + = vstrprintf ( pszFormat , arg_ptr ) ;
va_end ( arg_ptr ) ;
int line_start = 0 , line_end ;
while ( ( line_end = buffer . find ( ' \n ' , line_start ) ) ! = - 1 )
{
OutputDebugStringA ( buffer . substr ( line_start , line_end - line_start ) . c_str ( ) ) ;
line_start = line_end + 1 ;
ret + = line_end - line_start ;
}
buffer . erase ( 0 , line_start ) ;
}
# endif
return ret ;
return ret ;
}
}