summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-05-03 09:55:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-05-03 09:55:31 -0400
commit2a10bd406c9155d30a82657ce2ee532b3a677d83 (patch)
tree0d5094583c60c4d57b52532f0407b09523d8d79f /indra/newview/llviewerstats.cpp
parent2994833e7cc53670bd3303cb88054d7acee875cf (diff)
DRTVWR-559: Replace debugLoggingEnabled() function with LL_DEBUGS().
The trouble with debugLoggingEnabled() is that it locked mutexes and searched maps every time that call was reached. LL_DEBUGS() has the same functionality (albeit with idiosyncratic syntax) but performs expensive lookups only once per session, caching the result in a local static variable.
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r--indra/newview/llviewerstats.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 4babf5a7f6..609e8290da 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -829,12 +829,11 @@ void send_viewer_stats(bool include_preferences)
LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL;
- if (debugLoggingEnabled("LogViewerStatsPacket"))
- {
- std::string filename("viewer_stats_packet.xml");
- llofstream of(filename.c_str());
- LLSDSerialize::toPrettyXML(body,of);
- }
+ LL_DEBUGS("LogViewerStatsPacket");
+ std::string filename("viewer_stats_packet.xml");
+ llofstream of(filename.c_str());
+ LLSDSerialize::toPrettyXML(body,of);
+ LL_ENDL;
// The session ID token must never appear in logs
body["session_id"] = gAgentSessionID;