-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing bugs in DDFileLogger #183
Fixing bugs in DDFileLogger #183
Conversation
|
||
- (void)rollLogFile; | ||
- (void)rollLogFileWithCompletion:(void (^)())completionBlock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rollLogFileWithCompletionBlock:
would be better?
Just a small detail, but as it is ugly to change the API later ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, done.
…' in DDFileLogger. 'rollLogFile' method is deprecated now. Completion block is optional and will be called on main queue.
…If file is moved/removed - rolling it and creating new one.
…ow we are setting appropriate NSFileProtectionKey (NSFileProtectionCompleteUntilFirstUserAuthentication if app is able launch from background and NSFileProtectionCompleteUnlessOpen in other cases).
Fixing bugs in DDFileLogger
@@ -49,6 +49,10 @@ - (void)maybeRollLogFileDueToSize; | |||
|
|||
@end | |||
|
|||
#if TARGET_OS_IPHONE | |||
BOOL doesAppRunInBackground(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be static: unprefixed extern method is bound to cause a linker error :D
Fixes for issues:
rollLogFileWithCompletion:
,rollLogFile
became deprecated.currentLogFileVnode
to monitor file descriptor, and if file gets moved or deleted - we are rolling it and create a new one.UPD
Issue #129 is also fixed. Setting appropriate
NSFileProtectionKey
when creating log file on iOS.