From 56f6fee1e070a1c04a8d31158c86965e8cebfca6 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 17 Jun 2007 12:31:20 +0000 Subject: [PATCH] bug fix -> logging --- src/util.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/util.h b/src/util.h index e430f4e1..02ef817d 100755 --- a/src/util.h +++ b/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: