diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-02-25 19:12:36 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-02-25 19:12:36 -0500 |
commit | b16dcda6a387774a446c04f63e1a55bd35ec7afe (patch) | |
tree | 34eb08ecb28fddba4d1aa63ca5016ebad0d6b08c /indra/newview/llappearancemgr.cpp | |
parent | b6f814af25a957e71dc8d9dd314ac15e3cbe6cd9 (diff) |
SH-3860 WIP, SH-3899 WIP - make folder version management more debuggable, log appearance request results
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 10523ca998..d0f28b8c10 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -50,6 +50,7 @@ #include "llviewerregion.h" #include "llwearablelist.h" #include "llsdutil.h" +#include "llsdserialize.h" std::string self_av_string() { @@ -3049,6 +3050,10 @@ public: if (content["success"].asBoolean()) { LL_DEBUGS("Avatar") << "OK" << LL_ENDL; + if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) + { + dumpContents("appearance_request_ok", content); + } } else { @@ -3056,11 +3061,23 @@ public: } } + void dumpContents(const std::string outprefix, const LLSD& content) + { + std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml"); + std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); + std::ofstream ofs(fullpath); + ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY); + LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL; + } + // Error /*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "appearance update request failed, status: " << status << " reason: " << reason << llendl; - LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL; + llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl; + if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) + { + dumpContents("appearance_request_error", content); + } onFailure(status); } @@ -3095,6 +3112,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond if (!gAgent.getRegion()) { llwarns << "Region not set, cannot request server appearance update" << llendl; + return; } if (gAgent.getRegion()->getCentralBakeVersion()==0) { @@ -3110,7 +3128,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond LLSD body; S32 cof_version = getCOFVersion(); body["cof_version"] = cof_version; - LL_DEBUGS("Avatar") << "my_cof_version " << cof_version << llendl; + LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl; //LLCurl::ResponderPtr responder_ptr; if (!responder_ptr.get()) |