summaryrefslogtreecommitdiff
path: root/indra/newview/llfacebookconnect.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-06-29 13:07:37 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-06-29 13:07:37 -0400
commitf779c164a2da0eec3454d1d26ccd333751afcf4f (patch)
tree991fd627a29a1b7907ecc50196ca4c9b3ae860ed /indra/newview/llfacebookconnect.cpp
parent6696577feb199484a3cbf164cec5a662d281913e (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/newview/llfacebookconnect.cpp')
-rwxr-xr-xindra/newview/llfacebookconnect.cpp16
1 files changed, 14 insertions, 2 deletions
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;
}