summaryrefslogtreecommitdiff
path: root/db/lasterror.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'db/lasterror.cpp')
-rw-r--r--db/lasterror.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/db/lasterror.cpp b/db/lasterror.cpp
index 630fcfb00f3..12fc694eb3b 100644
--- a/db/lasterror.cpp
+++ b/db/lasterror.cpp
@@ -34,8 +34,11 @@ namespace mongo {
void raiseError(int code , const char *msg) {
LastError *le = lastError.get();
if ( le == 0 ) {
- /* might be intentional (non-user thread) */
- OCCASIONALLY DEV if( !isShell ) log() << "warning dev: lastError==0 won't report:" << msg << endl;
+ /* might be intentional (non-user thread) */
+ DEV {
+ static unsigned n;
+ if( ++n < 4 && !isShell ) log() << "dev: lastError==0 won't report:" << msg << endl;
+ }
} else if ( le->disabled ) {
log() << "lastError disabled, can't report: " << code << ":" << msg << endl;
} else {