Patch updates loging for sandboxed apps.

This commit is contained in:
Dmytro Tretiakov committed 2015-08-26 17:32:54 +03:00
1 parent 45345c0a44
commit 8a7857ba59
2 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -232,7 +232,7 @@ int main(int __unused argc, const char __unused *argv[])
[connection setRootObject:appInstaller];
if (![connection registerName:[NSString stringWithFormat:@"Sparkle-%@", [NSBundle bundleWithPath:appInstaller.hostPath].bundleIdentifier]])
{
NSLog(@"%@ server: could not register server. Is one already running?\n", args.firstObject);
SULog(@"%@ server: could not register server. Is one already running?\n", args.firstObject);
}
[application setDelegate:appInstaller];
+4 -1
View File
@@ -63,7 +63,11 @@ void SULog(NSString *format, ...)
va_list ap;
va_start(ap, format);
NSString *theStr = [[NSString alloc] initWithFormat:format arguments:ap];
va_end(ap);
#ifdef DEBUG
NSLog(@"Sparkle: %@", theStr);
#endif
FILE *logfile = fopen([[SULogFilePath stringByExpandingTildeInPath] fileSystemRepresentation], "a");
if (logfile) {
@@ -72,7 +76,6 @@ void SULog(NSString *format, ...)
fwrite([theData bytes], 1, [theData length], logfile);
fclose(logfile);
}
va_end(ap);
}