[mapserver-users] Proposal: "DEBUG true" for layers
Daniel Morissette
morissette at dmsolutions.ca
Wed Jan 16 10:15:33 PST 2002
Dave, and all,
Why not have the DEBUG flag in the web object instead so that it applies
to all of MapServer. There are other situations (outside of layer
context) where some debug information could be useful.
Actually, there is already a LOG paramater in the WEB object but I don't
think it does much. Perhaps instead of a DEBUG flag, the LOG parameter
could be used to control debug output, and the LOG value if it is set
would be the filename where the debug output should be sent.
BTW, about using fprintf(stderr, ...), using this makes Apache hang on
Windows in some circumstances, so we have implemented a msDebug()
function in maperror.c that takes printf-style arguments and that we use
instead. It writes to stderr on Unix, and simply does nothing on
Windows.
If we were to implement DEBUG or LOG support then I think all the debug
and logfile logic should be contained in that function and your code
would simply call msDebug(). And of course the Windows case in
msDebug() would have to be fixed.
Just my 0.02$
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
Dave Blasby wrote:
>
> I'm getting a several questions from people regarding why certain SQL
> statements are not functioning as expected with the PostGIS connector.
> I'm sure the folk doing the oraclespatial and SDE would appreciated this
> as well.
>
> I'd like to add code like:
>
> if (layerinfo->debug)
> {
> fprintf(stderr,"the sql statement was: %s\n", sql);
> }
>
> To do this:
> 1. Add another item to the layerObj structure
> char debug; //default = false. true=print out debug info for this
> layer
> 2. Add code to the parser to hand the "DEBUG true/false" option for
> layers. Default should be false.
>
> I'd do it myself, but I dont want to mess with the parser.
>
> Do folk think this is worth adding?
>
> dave
More information about the MapServer-users
mailing list