Skip to content

Commit

Permalink
Avoid infinite recursion if no log file variable set
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 16, 2011
1 parent 66dded4 commit 53eb763
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/core/qgslogger.h
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgis_map_serv.cpp
Expand Up @@ -62,7 +62,7 @@ void dummyMessageHandler( QtMsgType type, const char *msg )

output += msg;

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

if ( type == QtFatalMsg )
abort();
Expand Down

0 comments on commit 53eb763

Please sign in to comment.