[Mapserver-users] What is DEBUG parameter for?

Daniel Morissette dmorissette at dmsolutions.ca
Fri May 21 16:22:54 PDT 2004


Eduardo Patto Kanegae wrote:
> I've tested parameter DEBUG of the map object with a MapServer CGI application, but it doesn't matter if DEBUG is ON or OFF, log messages are generated at the same way in the LogFile.
> 
> if I unset the LOG parameter, MapServer errors are sent the same way even with DEBUG ON or OFF.
> 
> I didn't understand the real purpose of DEBUG parameter...
> 

The DEBUG parameter generally produces additional logging output via the 
internal msDebug() function which writes to stderr and not to the 
logfile specified in the mapfile.  By default with Apache stderr goes to 
the Apache error_log file.  For historical reasons the LOG parameter in 
the mapfile currently applies only to the mapserv CGI and not to 
MapScript, that's why msDebug() doesn't currently use its value. It is 
my hope someday to modify msDebug() to write to that logfile if it is 
set (instead of the apache error_log which would remain the default).

Note that msDebug() is enabled only when MapServer is configured with 
the --enable-debug option on Linux/Unix, or using -DENABLE_STDERR_DEBUG 
-DNEED_NONBLOCKING_STDERR on Windows.  I believe our most recent win32 
builds (the 4.2beta ones) should have that enabled but I never checked.

HTH

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the MapServer-users mailing list