Why not always DEBUG=MSDEBUG?

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Mon Dec 11 16:37:01 EST 2006


I'm +1 for being able to turn on/off debug output without having a debug 
compiled version. The only stuff that is currently output is timing by 
default and that is all I regularly use and that I think other users 
would use that are not developing.

So one option might be to add mapfile tags like TIMING ON|OFF that can 
be decoupled from the DEBUG ON/OFF and this would be accessible all the 
time. I think this decouples some of Daniel's concerns and we could make 
it do the "right" thing whatever that is on all environments.

-Steve W.

Frank Warmerdam wrote:
> Daniel Morissette wrote:
>> Frank Warmerdam wrote:
>>> Can anyone think of a reason we wouldn't always enable use of 
>>> debugging output
>>> in mapserver?  
>> Here are the two reasons I can think of:
>> 1- I am not 100% sure that all msDebug() calls are protected by an 
>> if(...debug) test. This would need to be verified prior to making your 
>> proposed change
>> 2- Under IIS, stderr is merged with stdout so msDebug() just doesn't 
>> work there and enabling debug in that environment can (and often 
>> does!) result in malformed headers or corrupt output.
> Daniel,
> OK, I'm going to withdrawn the simple approach for now, and will try
> to propose something a bit more comprehensive based that also addresses
> use of MS_ERRORFILE and the LOG directive (is there such a thing? I
> don't know anything about it).
>> That would probably be a good idea as long as we also take care of the 
>> issues above.
>> BTW, bugs 709, 1333 and 1783 relate to this directly or indirectly and 
>> I had included a "cleanup of LOG/DEBUG output mechanisms" item 
>> covering them in the 5.0 roadmap.
> I have ensured I'm attached to all of these.
> Best regards,

More information about the mapserver-dev mailing list