bug fix -> logging
This commit is contained in:
parent
f994be33f9
commit
56f6fee1e0
1 changed files with 11 additions and 4 deletions
15
src/util.h
15
src/util.h
|
@ -484,13 +484,20 @@ public:
|
|||
{
|
||||
// open file
|
||||
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() );
|
||||
fflush ( pFile );
|
||||
return *this;
|
||||
if ( bDoLogging )
|
||||
{
|
||||
fprintf ( pFile, "%s\n", sNewStr.latin1() );
|
||||
fflush ( pFile );
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue