Skip to content
Snippets Groups Projects
Commit 6e790fc2 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

SL-821: Add logging in the macOS BugSplat attachment override.

parent b889c15c
No related branches found
No related tags found
No related merge requests found
...@@ -202,9 +202,12 @@ ...@@ -202,9 +202,12 @@
- (BugsplatAttachment *)attachmentForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager { - (BugsplatAttachment *)attachmentForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager {
std::string logfile = getLogFilePathname(); std::string logfile = getLogFilePathname();
infos("Reached attachmentForBugsplatStartupManager with:");
infos(logfile);
NSString *ns_logfile = [NSString stringWithCString:logfile.c_str() NSString *ns_logfile = [NSString stringWithCString:logfile.c_str()
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
NSData *data = [NSData dataWithContentsOfFile:ns_logfile]; NSData *data = [NSData dataWithContentsOfFile:ns_logfile];
infos("Read logfile");
// Apologies for the hard-coded log-file basename, but I do not know the // Apologies for the hard-coded log-file basename, but I do not know the
// incantation for "$(basename "$logfile")" in this language. // incantation for "$(basename "$logfile")" in this language.
...@@ -212,6 +215,7 @@ ...@@ -212,6 +215,7 @@
[[BugsplatAttachment alloc] initWithFilename:@"SecondLife.log" [[BugsplatAttachment alloc] initWithFilename:@"SecondLife.log"
attachmentData:data attachmentData:data
contentType:@"text/plain"]; contentType:@"text/plain"];
infos("returning attachment");
return attachment; return attachment;
} }
......
...@@ -30,5 +30,6 @@ bool pumpMainLoop(); ...@@ -30,5 +30,6 @@ bool pumpMainLoop();
void handleQuit(); void handleQuit();
void cleanupViewer(); void cleanupViewer();
std::string getLogFilePathname(); std::string getLogFilePathname();
void infos(const std::string& message);
#endif /* ! defined(LL_LLAPPVIEWERMACOSX_FOR_OBJC_H) */ #endif /* ! defined(LL_LLAPPVIEWERMACOSX_FOR_OBJC_H) */
...@@ -153,6 +153,11 @@ std::string getLogFilePathname() ...@@ -153,6 +153,11 @@ std::string getLogFilePathname()
return gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log"); return gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log");
} }
void infos(const std::string& message)
{
LL_INFOS() << message << LL_ENDL;
}
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
// Store off the command line args for use later. // Store off the command line args for use later.
......
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