[mapserver-users] Proposal: "DEBUG true" for layers

Stephen Lime steve.lime at dnr.state.mn.us
Wed Jan 16 11:43:42 PST 2002


I thought about that but many times a mapObj isn't available to parts of the
code where you might want to debug which is why I went with the ENV variable
in the first place.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Dave Blasby <dblasby at refractions.net> 01/16/02 01:27PM >>>
I like the suggestions that daniel and stephen made.

Perhaps we could make things easier and do something like a high-level
option like:

DEBUG off/weberror/fname  

And then expose a function that can be called anywhere in mapserver
(i.e. msDebugMessage(...) ) that would:
a) do nothing if DEBUG off
b) send to the webserver error log if DEBUG weberror
c) append to a file if DEBUG fname (watch for security issues)

msDebugMessage(...) would act just like printf(...). 

This way, as a programmer, I can just riddle my code with
msDebugMessage(...) calls and not have to
think about anything else.

dave
ps.  The reason I originally suggested putting it in a layer object was
to limit the amount of output generated.  I mean, if you have 10 layer,
you could have 100's of debug messages...




More information about the MapServer-users mailing list