bool LLCrashLogger::sendCrashLogs() { gatherFiles(); LLSD post_data; post_data = constructPostData(); updateApplication("Sending reports..."); std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLifeCrashReport"); std::string report_file = dump_path + ".log"; std::ofstream out_file(report_file.c_str()); LLSDSerialize::toPrettyXML(post_data, out_file); out_file.close(); bool sent = false; //*TODO: Translate if(mCrashHost != "") { sent = runCrashLogPost(mCrashHost, post_data, std::string("Sending to server"), 3, 5); } if(!sent) { sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5); } mSentCrashLogs = sent; return true; }
bool LLCrashLogger::sendCrashLog(std::string dump_dir) { gDirUtilp->setDumpDir( dump_dir ); std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SingularityCrashReport"); std::string report_file = dump_path + ".log"; gatherFiles(); LLSD post_data; post_data = constructPostData(); llinfos << "Sending reports..." << llendl; std::ofstream out_file(report_file.c_str()); LLSDSerialize::toPrettyXML(post_data, out_file); out_file.close(); LLHTTPClient::post(mCrashHost, post_data, new LLCrashLoggerResponder()); return true; }