From 663e45c7eade823e4eb88195057333cbd37e0b00 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 11 Jan 2021 20:40:47 +0200 Subject: SL-1028 Bugsplat based windows viewers should not overwrite log files from main instance --- indra/newview/llappviewerwin32.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'indra/newview/llappviewerwin32.cpp') diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 9b1c0d1f8b..32548b7065 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -118,16 +118,20 @@ namespace { if (nCode == MDSCB_EXCEPTIONCODE) { - // 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"))); + // second instance does not have own log files + if (!LLAppViewer::instance()->isSecondInstance()) + { + // 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( - WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml"))); + sBugSplatSender->sendAdditionalFile( + WCSTR(*LLAppViewer::instance()->getStaticDebugFile())); + } 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 // metadata field for the platform identifier. -- cgit v1.2.3 From 7fc651920875136cbb2481506a8154263081d638 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 3 Sep 2021 10:36:18 +0300 Subject: DRTVWR-545 Megre fix --- indra/newview/llappviewerwin32.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview/llappviewerwin32.cpp') diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 1896248502..0e63268107 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -118,14 +118,16 @@ namespace { if (nCode == MDSCB_EXCEPTIONCODE) { - // second instance does not have own log files + // send the main viewer log file, one per instance + // widen to wstring, convert to __wchar_t, then pass c_str() + sBugSplatSender->sendAdditionalFile( + WCSTR(LLError::logFileName())); + + // second instance does not have some log files + // TODO: This needs fixing, if each instance now has individual logs, + // same should be made true for static debug files if (!LLAppViewer::instance()->isSecondInstance()) { - // 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( WCSTR(*LLAppViewer::instance()->getStaticDebugFile())); } -- cgit v1.2.3