From 35bc91fc5dee77133fff0c0066e3e34689941dfd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 22 Jul 2013 22:06:48 -0400 Subject: CHOP-962: Emit unrecognized-var log message only for Global settings. LLControlGroup::loadFromFile() can of course detect which LLControlGroup instance it's loading. We only want to log unrecognized settings variables in LLControlGroup "Global". Settings for "Don't show me this again" notifications are in group "Warnings". --- indra/llxml/llcontrol.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 9dc6292cb2..6e11a5f6f3 100755 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -959,8 +959,20 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v // LLControlVariable persistent because the 'persistent' flag // is not itself persisted! control->forcePersist(); - LL_INFOS("LLControlGroup") << "preserving unrecognized user settings variable " - << name << LL_ENDL; + // We want to mention unrecognized user settings variables + // (e.g. from a newer version of the viewer) in the log. But + // we also arrive here for Boolean variables generated by + // the notifications subsystem when the user checks "Don't + // show me this again." These aren't declared in settings.xml; + // they're actually named for the notification they suppress. + // We don't want to mention those. Apologies, this is a bit of + // a hack: we happen to know that user settings go into an + // LLControlGroup whose name is "Global". + if (getKey() == "Global") + { + LL_INFOS("LLControlGroup") << "preserving unrecognized " << getKey() + << " settings variable " << name << LL_ENDL; + } } } -- cgit v1.2.3