[mapserver-users] Can I skip logging MS_NOTFOUND errors?
Peter Schmitt
pschmitt at gmail.com
Tue Jun 4 12:43:40 PDT 2019
Hi,
I have MapServer configured to serve a WFS endpoint with GeoJSON. The data
itself is in a PostGIS database. When I make a query for data that's
non-existent, I get an empty feature collection:
> curl
http://localhost/mapserv?service=WFS&VERSION=1.1.0&REQUEST=getfeature&typename=some_layer&srsname=EPSG:4326&OUTPUTFORMAT=geojson&some_runtime_substitution_parameter=42
> {
> "type": "FeatureCollection",
> "name": "some_layer",
> "features": []
> }
This works as anticipated. What I didn't expect is that MapServer logs an
error:
> msQueryByRect(): Search returned no results. No matching record(s) found
I think this code is being invoked:
https://github.com/mapserver/mapserver/blob/master/mapquery.c#L1287-L1288
I do not think having no results should be considered an error. Is there a
way to silence just this one type of error? I couldn't find anything
obvious other than other than redirecting stderr to /dev/null or remove it
via grep/sed.
Thanks,
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190604/3c5b02e2/attachment.htm>
More information about the MapServer-users
mailing list