diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2015-06-29 13:07:37 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2015-06-29 13:07:37 -0400 |
commit | f779c164a2da0eec3454d1d26ccd333751afcf4f (patch) | |
tree | 991fd627a29a1b7907ecc50196ca4c9b3ae860ed /indra | |
parent | 6696577feb199484a3cbf164cec5a662d281913e (diff) |
MAINT-5200: Add DebugSlshareLogTag temp setting for developers.
This allows engaging slshare-service debug logging for a particular viewer
session without having to twiddle the slshare-service hosts.
Also fix leaky LLCore::HttpHeaders::ptr_t construction.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 11 | ||||
-rwxr-xr-x | indra/newview/llfacebookconnect.cpp | 16 |
2 files changed, 25 insertions, 2 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 845cb5ae96..fca3fd8cf3 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2370,6 +2370,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>DebugSlshareLogTag</key> + <map> + <key>Comment</key> + <string>Request slshare-service debug logging</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string/> + </map> <key>DebugStatModeFPS</key> <map> <key>Comment</key> diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index ccfd7f6442..0aaee4f961 100755 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -41,6 +41,7 @@ #include "lltrans.h" #include "llevents.h" #include "llviewerregion.h" +#include "llviewercontrol.h" #include "llfloaterwebcontent.h" #include "llfloaterreg.h" @@ -69,8 +70,19 @@ void toast_user_for_facebook_success() LLCore::HttpHeaders::ptr_t get_headers() { - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - httpHeaders->append("X-debug-tag", "dbgvwr"); + LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders, false); + // The DebugSlshareLogTag mechanism is intended to trigger slshare-service + // debug logging. slshare-service is coded to respond to an X-debug-tag + // header by engaging debug logging for that request only. This way a + // developer need not muck with the slshare-service image to engage debug + // logging. Moreover, the value of X-debug-tag is embedded in each such + // log line so the developer can quickly find the log lines pertinent to + // THIS session. + std::string logtag(gSavedSettings.getString("DebugSlshareLogTag")); + if (! logtag.empty()) + { + httpHeaders->append("X-debug-tag", logtag); + } return httpHeaders; } |