summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-06-19 15:08:56 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-06-19 15:08:56 -0400
commitd26c931ae2c5d33adc5fc20842b7be838a2822b4 (patch)
tree0d2c4686810f1d353485048eb3eed6be2565dcbd /indra/newview
parent3376b2acfbea2f6d2d8f79ecf890702e1ab60ae3 (diff)
SL-821: Send the SecondLife.log from the previous (crashed) run.
Also clean up log messages.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappdelegate-objc.mm16
-rw-r--r--indra/newview/llappviewermacosx-for-objc.h2
-rw-r--r--indra/newview/llappviewermacosx.cpp4
3 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index 2ee294e1e6..4510f4070f 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -196,21 +196,27 @@
#if defined(LL_BUGSPLAT)
+#if 0
+// Apparently this override method only contributes the User Description field
+// of BugSplat's All Crashes table. Despite the method name, it would seem to
+// be a bad place to try to stuff all of SecondLife.log.
- (NSString *)applicationLogForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager
{
// return NSStringFromSelector(_cmd);
infos("Reached applicationLogForBugsplatStartupManager");
return @"[contents of SecondLife.log]";
}
+#endif
- (BugsplatAttachment *)attachmentForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager {
- std::string logfile = getLogFilePathname();
- infos("Reached attachmentForBugsplatStartupManager with:");
- infos(logfile);
+ // We get the *old* log file pathname (for SecondLife.old) because it's on
+ // the run *following* the crash that BugsplatStartupManager notices that
+ // the previous run crashed and calls this override. By that time, we've
+ // already renamed SecondLife.log to SecondLife.old.
+ std::string logfile = getOldLogFilePathname();
NSString *ns_logfile = [NSString stringWithCString:logfile.c_str()
encoding:NSUTF8StringEncoding];
NSData *data = [NSData dataWithContentsOfFile:ns_logfile];
- infos("Read logfile");
// Apologies for the hard-coded log-file basename, but I do not know the
// incantation for "$(basename "$logfile")" in this language.
@@ -218,7 +224,7 @@
[[BugsplatAttachment alloc] initWithFilename:@"SecondLife.log"
attachmentData:data
contentType:@"text/plain"];
- infos("returning attachment");
+ infos("attachmentForBugsplatStartupManager: attaching " + logfile);
return attachment;
}
diff --git a/indra/newview/llappviewermacosx-for-objc.h b/indra/newview/llappviewermacosx-for-objc.h
index e45cb85861..c439297611 100644
--- a/indra/newview/llappviewermacosx-for-objc.h
+++ b/indra/newview/llappviewermacosx-for-objc.h
@@ -29,7 +29,7 @@ void handleUrl(const char* url_utf8);
bool pumpMainLoop();
void handleQuit();
void cleanupViewer();
-std::string getLogFilePathname();
+std::string getOldLogFilePathname();
void infos(const std::string& message);
#endif /* ! defined(LL_LLAPPVIEWERMACOSX_FOR_OBJC_H) */
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 562e7ebfde..d014e992f9 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -148,9 +148,9 @@ void cleanupViewer()
gViewerAppPtr = NULL;
}
-std::string getLogFilePathname()
+std::string getOldLogFilePathname()
{
- return gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log");
+ return gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.old");
}
void infos(const std::string& message)