Skip to content
Permalink
Browse files
mapserver: use default message handler for debugging output on windows
git-svn-id: http://svn.osgeo.org/qgis/trunk@15186 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 17, 2011
1 parent a1e1ec9 commit 9217cfe8792350beec5a6d6acd02e030655597ca
Showing with 12 additions and 1 deletion.
  1. +3 −1 src/mapserver/qgis_map_serv.cpp
  2. +9 −0 src/mapserver/qgsmapserverlogger.cpp
@@ -130,7 +130,9 @@ QFileInfo defaultAdminSLD()

int main( int argc, char * argv[] )
{
#ifndef _MSC_VER
qInstallMsgHandler( dummyMessageHandler );
#endif

QgsApplication qgsapp( argc, argv, false );

@@ -150,7 +152,7 @@ int main( int argc, char * argv[] )

// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
#ifdef QGSMSDEBUG
#ifdef QGSMSDEBUG && !_MSC_VER
//write to qgis_wms_server.log in application directory
QgsMapServerLogger::instance()->setLogFilePath( qgsapp.applicationDirPath() + "/qgis_wms_server.log" );
#endif
@@ -17,6 +17,10 @@

#include "qgsmapserverlogger.h"

#ifdef _MSC_VER
#include <windows.h>
#endif

QgsMapServerLogger* QgsMapServerLogger::mInstance = 0;

QgsMapServerLogger::QgsMapServerLogger()
@@ -51,7 +55,12 @@ int QgsMapServerLogger::setLogFilePath( const QString& path )
void QgsMapServerLogger::printMessage( const QString& message )
{
if ( !mLogFile.isOpen() )
{
#ifdef _MSC_VER
::OutputDebugString( message.toLocal8Bit() );
#endif
return;
}

mTextStream << message << endl;
}

0 comments on commit 9217cfe

Please sign in to comment.