Skip to content

Commit bf63d3d

Browse files
Reduce log clutter from non-errors
Prevent "No matching records" from filling up logfile in terse mode. #5706
1 parent d7fa02e commit bf63d3d

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

mapquery.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,8 @@ int msQueryByFilter(mapObj *map)
986986
return MS_SUCCESS;
987987
}
988988

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

992993
query_error:
@@ -1284,7 +1285,8 @@ int msQueryByRect(mapObj *map)
12841285
return(MS_SUCCESS);
12851286
}
12861287

1287-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByRect()");
1288+
if( lp->debug >= MS_DEBUGLEVEL_V )
1289+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByRect()");
12881290
return(MS_FAILURE);
12891291
}
12901292

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

1604-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFeatures()");
1606+
if( lp->debug >= MS_DEBUGLEVEL_V )
1607+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFeatures()");
16051608
return(MS_FAILURE);
16061609
}
16071610

@@ -1836,7 +1839,8 @@ int msQueryByPoint(mapObj *map)
18361839
return(MS_SUCCESS);
18371840
}
18381841

1839-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByPoint()");
1842+
if( lp->debug >= MS_DEBUGLEVEL_V )
1843+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByPoint()");
18401844
return(MS_FAILURE);
18411845
}
18421846

@@ -2115,7 +2119,8 @@ int msQueryByShape(mapObj *map)
21152119
return(MS_SUCCESS);
21162120
}
21172121

2118-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByShape()");
2122+
if( lp->debug >= MS_DEBUGLEVEL_V )
2123+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByShape()");
21192124
return(MS_FAILURE);
21202125
}
21212126

0 commit comments

Comments
 (0)