summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-01 14:19:30 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-01 14:19:30 -0700
commit01563600b6db616914315a31b3fc901c999d0165 (patch)
tree201a6a58478db853d13348cfa153e1407889b8d2 /indra
parentbb73374ba13220378485a88bee9649772eba8b44 (diff)
MAINT-1452 : Viewer floods the log file with hundreds of exactly the same lines.
Reviewed by Kelly
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvovolume.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 813fa72cc3..eb3bbb15bf 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1138,17 +1138,29 @@ void LLVOVolume::sculpt()
S32 current_discard = getVolume()->getSculptLevel() ;
if(current_discard < -2)
{
- llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
- << " is less than -2." << llendl;
+ static S32 low_sculpty_discard_warning_count = 100;
+ if (++low_sculpty_discard_warning_count >= 100)
+ { // Log first time, then every 100 afterwards otherwise this can flood the logs
+ llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
+ << " at " << current_discard
+ << " is less than -2." << llendl;
+ low_sculpty_discard_warning_count = 0;
+ }
// corrupted volume... don't update the sculpty
return;
}
else if (current_discard > MAX_DISCARD_LEVEL)
{
- llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
- << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
-
+ static S32 high_sculpty_discard_warning_count = 100;
+ if (++high_sculpty_discard_warning_count >= 100)
+ { // Log first time, then every 100 afterwards otherwise this can flood the logs
+ llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
+ << " at " << current_discard
+ << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
+ high_sculpty_discard_warning_count = 0;
+ }
+
// corrupted volume... don't update the sculpty
return;
}