aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPLogger.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-12-28 19:52:54 +0000
committerstuconnolly <stuart02@gmail.com>2010-12-28 19:52:54 +0000
commit37ef1ea26b8bd0e209f30474a53b9605ba8acfe6 (patch)
tree0432f1a449d64801f8d97dfda5faa48f8440b99f /Source/SPLogger.m
parente8bcfe72b6b59c8b881feff7ffdc8d719a82ff8c (diff)
parent16341191bcc112fcf18ddaed2d4755b11479ba45 (diff)
downloadsequelpro-37ef1ea26b8bd0e209f30474a53b9605ba8acfe6.tar.gz
sequelpro-37ef1ea26b8bd0e209f30474a53b9605ba8acfe6.tar.bz2
sequelpro-37ef1ea26b8bd0e209f30474a53b9605ba8acfe6.zip
Bring fravorites outline view branch up to date with trunk (r3036:3058).
Diffstat (limited to 'Source/SPLogger.m')
-rw-r--r--Source/SPLogger.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPLogger.m b/Source/SPLogger.m
index 743b0fce..5736fde6 100644
--- a/Source/SPLogger.m
+++ b/Source/SPLogger.m
@@ -107,7 +107,10 @@ static SPLogger *logger = nil;
NSString *logString = [[NSString alloc] initWithFormat:theString arguments:arguments];
va_end(arguments);
- // Write the log line, forcing an immediate write to disk to ensure logging
+ // Write the log line, forcing an immediate write to disk to ensure logging, and
+ // synchronised to allow use across multiple executables or their frameworks.
+ [logFileHandle synchronizeFile];
+ [logFileHandle seekToEndOfFile];
[logFileHandle writeData:[[NSString stringWithFormat:@"%@ %@\n", [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]], logString] dataUsingEncoding:NSUTF8StringEncoding]];
[logFileHandle synchronizeFile];