summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r--indra/llcommon/llerror.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index fa3a01c191..1d85bc0e70 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1072,6 +1072,29 @@ namespace LLError
s.uniqueLogMessages[message] = 1;
}
}
+
+ if (site.mPrintOnce)
+ {
+ std::map<std::string, unsigned int>::iterator messageIter = s.uniqueLogMessages.find(message);
+ if (messageIter != s.uniqueLogMessages.end())
+ {
+ messageIter->second++;
+ unsigned int num_messages = messageIter->second;
+ if (num_messages == 10 || num_messages == 50 || (num_messages % 100) == 0)
+ {
+ prefix << "ONCE (" << num_messages << "th time seen): ";
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ prefix << "ONCE: ";
+ s.uniqueLogMessages[message] = 1;
+ }
+ }
prefix << message;
message = prefix.str();