{"action":"closed","issue":{"url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/issues/453","labels_url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/issues/453/labels{/name}","comments_url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/issues/453/comments","events_url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/issues/453/events","html_url":"https://github.com/CocoaLumberjack/CocoaLumberjack/issues/453","id":57481716,"number":453,"title":"Crash in DDFileLogger when running unit tests","user":{"login":"radhap","id":1706699,"avatar_url":"https://avatars.githubusercontent.com/u/1706699?v=3","gravatar_id":"","url":"https://api.github.com/users/radhap","html_url":"https://github.com/radhap","followers_url":"https://api.github.com/users/radhap/followers","following_url":"https://api.github.com/users/radhap/following{/other_user}","gists_url":"https://api.github.com/users/radhap/gists{/gist_id}","starred_url":"https://api.github.com/users/radhap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radhap/subscriptions","organizations_url":"https://api.github.com/users/radhap/orgs","repos_url":"https://api.github.com/users/radhap/repos","events_url":"https://api.github.com/users/radhap/events{/privacy}","received_events_url":"https://api.github.com/users/radhap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/labels/Bug","name":"Bug","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/milestones/12","html_url":"https://github.com/CocoaLumberjack/CocoaLumberjack/milestones/2.x.x","labels_url":"https://api.github.com/repos/CocoaLumberjack/CocoaLumberjack/milestones/12/labels","id":978443,"number":12,"title":"2.x.x","description":"Taks that can be done after releasing 2.0.0 without breaking compatibility. Tasks that do break compatibility or make big changes should go into 2.0.0.","creator":{"login":"rivera-ernesto","id":1261982,"avatar_url":"https://avatars.githubusercontent.com/u/1261982?v=3","gravatar_id":"","url":"https://api.github.com/users/rivera-ernesto","html_url":"https://github.com/rivera-ernesto","followers_url":"https://api.github.com/users/rivera-ernesto/followers","following_url":"https://api.github.com/users/rivera-ernesto/following{/other_user}","gists_url":"https://api.github.com/users/rivera-ernesto/gists{/gist_id}","starred_url":"https://api.github.com/users/rivera-ernesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rivera-ernesto/subscriptions","organizations_url":"https://api.github.com/users/rivera-ernesto/orgs","repos_url":"https://api.github.com/users/rivera-ernesto/repos","events_url":"https://api.github.com/users/rivera-ernesto/events{/privacy}","received_events_url":"https://api.github.com/users/rivera-ernesto/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2015-02-13T14:11:26Z","updated_at":"2015-02-28T21:29:51Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-02-12T16:18:53Z","updated_at":"2015-02-28T21:29:51Z","closed_at":"2015-02-28T21:29:51Z","body":"Crashes at below line in DDFileLogger.m when running unit tests\r\n\r\n[self addObserver:self forKeyPath:NSStringFromSelector(@selector(maximumNumberOfLogFiles)) options:kvoOptions context:nil];\r\n\r\nSolution: \r\n\r\nchange addObserver to below \r\n*************\r\n NSString *keyPath = NSStringFromSelector(@selector(maximumNumberOfLogFiles));\r\n        if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {\r\n            [self addObserver:self forKeyPath:keyPath options:kvoOptions context:nil];\r\n        }\r\n*************\r\nAdd below method\r\n\r\n+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)theKey {\r\n    BOOL automatic = NO;\r\n    if ([theKey isEqualToString:@\"maximumNumberOfLogFiles\"]) {\r\n        automatic = NO;\r\n    }\r\n    else {\r\n        automatic = [super automaticallyNotifiesObserversForKey:theKey];\r\n    }\r\n    return automatic;\r\n}"}}