mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Simpler newline
This commit is contained in:
1 parent
de9ec2a849
commit
80dee159de
1 file changed
+1
-4
Vendored
+1
-4
@@ -64,13 +64,10 @@ void SULog(NSString *format, ...)
|
||||
|
||||
FILE *logfile = fopen([[LOG_FILE_PATH stringByExpandingTildeInPath] fileSystemRepresentation], "a");
|
||||
if (logfile) {
|
||||
theStr = [NSString stringWithFormat:@"%@: %@", [NSDate date], theStr];
|
||||
theStr = [NSString stringWithFormat:@"%@: %@\n", [NSDate date], theStr];
|
||||
NSData *theData = [theStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
char newlineChar = '\n';
|
||||
fwrite([theData bytes], 1, [theData length], logfile);
|
||||
fwrite(&newlineChar, 1, 1, logfile); // Append a newline.
|
||||
fclose(logfile);
|
||||
logfile = NULL;
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user