summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcrashlogger/llcrashlogger.cpp13
-rw-r--r--indra/llvfs/llvfs_objc.mm9
-rw-r--r--indra/mac_crash_logger/llcrashloggermac.cpp11
-rw-r--r--indra/mac_crash_logger/mac_crash_logger.cpp17
4 files changed, 44 insertions, 6 deletions
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index 7ecb34eaf6..008b0e04b5 100644
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -339,6 +339,10 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg
bool LLCrashLogger::sendCrashLogs()
{
+ std::ofstream wlog;
+ wlog.open("/Users/samantha/crashlogging2.txt");
+ wlog << "SPATTERS sendingCrashLogs.!\n";
+
gatherFiles();
LLSD post_data;
@@ -350,6 +354,7 @@ bool LLCrashLogger::sendCrashLogs()
"SecondLifeCrashReport");
std::string report_file = dump_path + ".log";
+ wlog << "SPATTERS looking in dump_path " << dump_path << " report_file " << report_file << "\n";
std::ofstream out_file(report_file.c_str());
LLSDSerialize::toPrettyXML(post_data, out_file);
out_file.close();
@@ -359,14 +364,18 @@ bool LLCrashLogger::sendCrashLogs()
//*TODO: Translate
if(mCrashHost != "")
{
+ wlog << "SPATTERS sending to MAIN host " << mCrashHost << "\n";
sent = runCrashLogPost(mCrashHost, post_data, std::string("Sending to server"), 3, 5);
}
if(!sent)
{
+ wlog << "SPATTERS sending to MAIN host " << mAltCrashHost << "\n";
sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5);
}
+ wlog.close();
+
mSentCrashLogs = sent;
return true;
@@ -384,7 +393,7 @@ bool LLCrashLogger::init()
LLCurl::initClass(false);
// We assume that all the logs we're looking for reside on the current drive
- gDirUtilp->initAppDirs("com.secondlife.indra.viewer");
+ gDirUtilp->initAppDirs("SecondLife");
LLError::initForApplication(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
@@ -394,6 +403,7 @@ bool LLCrashLogger::init()
// Rename current log file to ".old"
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log.old");
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log");
+ llinfos << "SPATTERS moving " << log_file << " to " << old_log_file <<llendl;
LLFile::rename(log_file.c_str(), old_log_file.c_str());
// Set the log file to crashreport.log
@@ -415,6 +425,7 @@ bool LLCrashLogger::init()
return false;
}
+ llinfos << "SPATTERS gets to here 1" << llendl;
gServicePump = new LLPumpIO(gAPRPoolp);
gServicePump->prime(gAPRPoolp);
LLHTTPClient::setPump(*gServicePump);
diff --git a/indra/llvfs/llvfs_objc.mm b/indra/llvfs/llvfs_objc.mm
index 4d7cd3a93e..61cfad99d6 100644
--- a/indra/llvfs/llvfs_objc.mm
+++ b/indra/llvfs/llvfs_objc.mm
@@ -51,10 +51,10 @@ std::string* findSystemDirectory(NSSearchPathDirectory searchPathDirectory,
YES);
if ([paths count])
{
- NSString *bundleName =
- [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
- path = [[paths objectAtIndex:0] stringByAppendingPathComponent:bundleName];
-
+ //NSString *bundleName = @"SecondLife";
+ //[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
+ //path = [[paths objectAtIndex:0] stringByAppendingPathComponent:bundleName];
+ path = [paths objectAtIndex:0];
//SPATTERS HACK: Always attempt to create directory, ignore errors.
NSError *error = nil;
@@ -88,6 +88,7 @@ std::string* getSystemApplicationSupportFolder()
{
return findSystemDirectory (NSApplicationSupportDirectory,
NSUserDomainMask);
+
}
#endif // LL_DARWIN
diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp
index 5d22b60136..64064d9cee 100644
--- a/indra/mac_crash_logger/llcrashloggermac.cpp
+++ b/indra/mac_crash_logger/llcrashloggermac.cpp
@@ -66,22 +66,31 @@ void LLCrashLoggerMac::gatherPlatformSpecificFiles()
bool LLCrashLoggerMac::mainLoop()
{
+ std::ofstream wlog;
+ wlog.open("/Users/samantha/crashlogging1.txt");
+ wlog << "SPATTERS mainloop.!\n";
+
if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
{
+ wlog << "sending\n";
gSendReport = true;
}
if(gRememberChoice)
{
+ wlog << "momento\n";
if(gSendReport) saveCrashBehaviorSetting(CRASH_BEHAVIOR_ALWAYS_SEND);
else saveCrashBehaviorSetting(CRASH_BEHAVIOR_NEVER_SEND);
}
if(gSendReport)
{
+ wlog << "Send report!";
setUserText(gUserNotes);
sendCrashLogs();
- }
+ }
+
+ wlog.close();
return true;
}
diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp
index 5e6806c08e..0d4f2855c7 100644
--- a/indra/mac_crash_logger/mac_crash_logger.cpp
+++ b/indra/mac_crash_logger/mac_crash_logger.cpp
@@ -34,22 +34,39 @@
int main(int argc, char **argv)
{
+ std::ofstream wlog;
+ wlog.open("/Users/samantha/crashlogging.txt");
+ wlog << "SPATTERS starting crash reporter.!\n";
LLCrashLoggerMac app;
+ wlog << "SPATTERS created app instance.!\n";
+ for (int x=0;x<argc;++x) wlog << "SPATTERS arg " << x << " is '" << argv[x] << "'\n";
app.parseCommandOptions(argc, argv);
+ wlog << "SPATTERS parsed commands.!\n";
if (! app.init())
{
+ wlog << "SPATTERS failed to init.!\n";
+
llwarns << "Unable to initialize application." << llendl;
return 1;
}
if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND)
{
+ wlog << "SPATTERS wanted to dialog.!\n";
+
// return NSApplicationMain(argc, (const char **)argv);
}
+ wlog << "SPATTERS starting mainloop.!\n";
+
app.mainLoop();
+ wlog << "SPATTERS finished main.!\n";
+
app.cleanup();
+ wlog << "SPATTERS finished cleanup.!\n";
+
llinfos << "Crash reporter finished normally." << llendl;
+ wlog.close();
return 0;
}