bug fix -> logging

This commit is contained in:
Volker Fischer 2007-06-17 12:31:20 +00:00
parent f994be33f9
commit 56f6fee1e0

View file

@ -484,13 +484,20 @@ public:
{ {
// open file // open file
pFile = fopen ( LOG_FILE_NAME, "a" ); pFile = fopen ( LOG_FILE_NAME, "a" );
if ( pFile != NULL )
{
bDoLogging = true;
}
} }
CLogging& operator<< ( const QString & sNewStr ) void operator<< ( const QString & sNewStr )
{ {
fprintf ( pFile, "%s\n", sNewStr.latin1() ); if ( bDoLogging )
fflush ( pFile ); {
return *this; fprintf ( pFile, "%s\n", sNewStr.latin1() );
fflush ( pFile );
}
} }
protected: protected: