Skip to content

Commit bc2fc29

Browse files
authored
Revert "Revert "Reduce log clutter from non-errors""
1 parent aa19af7 commit bc2fc29

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

mapquery.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,9 @@ 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()");
991+
}
990992
return MS_FAILURE;
991993

992994
query_error:
@@ -1284,7 +1286,9 @@ int msQueryByRect(mapObj *map)
12841286
return(MS_SUCCESS);
12851287
}
12861288

1287-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByRect()");
1289+
if( lp->debug >= MS_DEBUGLEVEL_V ) {
1290+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByRect()");
1291+
}
12881292
return(MS_FAILURE);
12891293
}
12901294

@@ -1601,7 +1605,9 @@ int msQueryByFeatures(mapObj *map)
16011605
if(GET_LAYER(map, l)->resultcache && GET_LAYER(map, l)->resultcache->numresults > 0) return(MS_SUCCESS);
16021606
}
16031607

1604-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFeatures()");
1608+
if( lp->debug >= MS_DEBUGLEVEL_V ) {
1609+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByFeatures()");
1610+
}
16051611
return(MS_FAILURE);
16061612
}
16071613

@@ -1836,7 +1842,9 @@ int msQueryByPoint(mapObj *map)
18361842
return(MS_SUCCESS);
18371843
}
18381844

1839-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByPoint()");
1845+
if( lp->debug >= MS_DEBUGLEVEL_V ) {
1846+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByPoint()");
1847+
}
18401848
return(MS_FAILURE);
18411849
}
18421850

@@ -2115,7 +2123,9 @@ int msQueryByShape(mapObj *map)
21152123
return(MS_SUCCESS);
21162124
}
21172125

2118-
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByShape()");
2126+
if( lp->debug >= MS_DEBUGLEVEL_V ) {
2127+
msSetError(MS_NOTFOUND, "No matching record(s) found.", "msQueryByShape()");
2128+
}
21192129
return(MS_FAILURE);
21202130
}
21212131

0 commit comments

Comments
 (0)