Skip to content

Commit

Permalink
Reduce log clutter from non-errors
Browse files Browse the repository at this point in the history
Prevent "No matching records" from filling up logfile in terse mode.
#5706
  • Loading branch information
computerchemist authored Nov 21, 2018
1 parent d7fa02e commit bf63d3d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mapquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,8 @@ int msQueryByFilter(mapObj *map)
return MS_SUCCESS;
}

msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFilter()");
if( lp->debug >= MS_DEBUGLEVEL_V )
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFilter()");
return MS_FAILURE;

query_error:
Expand Down Expand Up @@ -1284,7 +1285,8 @@ int msQueryByRect(mapObj *map)
return(MS_SUCCESS);
}

msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByRect()");
if( lp->debug >= MS_DEBUGLEVEL_V )
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByRect()");
return(MS_FAILURE);
}

Expand Down Expand Up @@ -1601,7 +1603,8 @@ int msQueryByFeatures(mapObj *map)
if(GET_LAYER(map, l)->resultcache && GET_LAYER(map, l)->resultcache->numresults > 0) return(MS_SUCCESS);
}

msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFeatures()");
if( lp->debug >= MS_DEBUGLEVEL_V )
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFeatures()");
return(MS_FAILURE);
}

Expand Down Expand Up @@ -1836,7 +1839,8 @@ int msQueryByPoint(mapObj *map)
return(MS_SUCCESS);
}

msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByPoint()");
if( lp->debug >= MS_DEBUGLEVEL_V )
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByPoint()");
return(MS_FAILURE);
}

Expand Down Expand Up @@ -2115,7 +2119,8 @@ int msQueryByShape(mapObj *map)
return(MS_SUCCESS);
}

msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByShape()");
if( lp->debug >= MS_DEBUGLEVEL_V )
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByShape()");
return(MS_FAILURE);
}

Expand Down

0 comments on commit bf63d3d

Please sign in to comment.