Skip to content
Snippets Groups Projects
Commit 663e45c7 authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-1028 Bugsplat based windows viewers should not overwrite log files from main instance

parent b3f0b0d9
No related branches found
No related tags found
No related merge requests found
...@@ -3066,6 +3066,15 @@ bool LLAppViewer::initWindow() ...@@ -3066,6 +3066,15 @@ bool LLAppViewer::initWindow()
void LLAppViewer::writeDebugInfo(bool isStatic) void LLAppViewer::writeDebugInfo(bool isStatic)
{ {
#if LL_WINDOWS && LL_BUGSPLAT
// bugsplat does not create dump folder and debug logs are written directly
// to logs folder, so it conflicts with main instance
if (mSecondInstance)
{
return;
}
#endif
//Try to do the minimum when writing data during a crash. //Try to do the minimum when writing data during a crash.
std::string* debug_filename; std::string* debug_filename;
debug_filename = ( isStatic debug_filename = ( isStatic
......
...@@ -118,16 +118,20 @@ namespace ...@@ -118,16 +118,20 @@ namespace
{ {
if (nCode == MDSCB_EXCEPTIONCODE) if (nCode == MDSCB_EXCEPTIONCODE)
{ {
// send the main viewer log file // second instance does not have own log files
// widen to wstring, convert to __wchar_t, then pass c_str() if (!LLAppViewer::instance()->isSecondInstance())
sBugSplatSender->sendAdditionalFile( {
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log"))); // send the main viewer log file
// widen to wstring, convert to __wchar_t, then pass c_str()
sBugSplatSender->sendAdditionalFile(
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log")));
sBugSplatSender->sendAdditionalFile( sBugSplatSender->sendAdditionalFile(
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml"))); WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
}
sBugSplatSender->sendAdditionalFile( sBugSplatSender->sendAdditionalFile(
WCSTR(*LLAppViewer::instance()->getStaticDebugFile())); WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml")));
// We don't have an email address for any user. Hijack this // We don't have an email address for any user. Hijack this
// metadata field for the platform identifier. // metadata field for the platform identifier.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment