Skip to content

Commit

Permalink
Fixed _currentLogFileInfo usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbertin committed Feb 11, 2022
1 parent ec997e8 commit b248832
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/CocoaLumberjack/DDFileLogger.m
Expand Up @@ -1328,6 +1328,8 @@ - (void)lt_logData:(NSData *)data {
}

@try {
NSFileHandle *handle = [self lt_currentLogFileHandle];

if (implementsDeprecatedWillLog) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
Expand All @@ -1337,7 +1339,6 @@ - (void)lt_logData:(NSData *)data {
[self willLogMessage:_currentLogFileInfo];
}

NSFileHandle *handle = [self lt_currentLogFileHandle];
if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)) {
__autoreleasing NSError *error = nil;
BOOL success = [handle seekToEndReturningOffset:nil error:&error];
Expand Down

0 comments on commit b248832

Please sign in to comment.