Skip to content
Permalink
Browse files

Avoid infinite recursion if no log file variable set

  • Loading branch information
mhugent committed Jun 16, 2011
1 parent 66dded4 commit 53eb76374a16d81edf3813504fa20fb1aaf18ae4
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/core/qgslogger.h
  2. +1 −1 src/mapserver/qgis_map_serv.cpp
@@ -110,14 +110,14 @@ class CORE_EXPORT QgsLogger
the function returns 1 if QGISDEBUG is defined and 0 if not*/
static int debugLevel();

/** Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. **/
static const void logMessageToFile( QString theMessage );

private:
/**Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set,
* otherwise returns a file name for writing log messages to.*/
static const QString logFile();

/** Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. **/
static const void logMessageToFile( QString theMessage );

/**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set.
* If set, only messages from this source file will be sent to logs. */
static const char* debugFile();
@@ -62,7 +62,7 @@ void dummyMessageHandler( QtMsgType type, const char *msg )

output += msg;

QgsDebugMsg( output );
QgsLogger::logMessageToFile( output );

if ( type == QtFatalMsg )
abort();

0 comments on commit 53eb763

Please sign in to comment.
You can’t perform that action at this time.