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