Skip to content
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

DDFileLogger: adding logFilesDiskQuota property. Fixes #195 #303

Conversation

dvor
Copy link
Member

@dvor dvor commented Jul 1, 2014

Now users have an option to set disk quota for log files. 20 MB is used by default, which seems enough.

@@ -106,6 +109,7 @@ - (void)dealloc
// try-catch because the observer might be removed or never added. In this case, removeObserver throws and exception
@try {
[self removeObserver:self forKeyPath:NSStringFromSelector(@selector(maximumNumberOfLogFiles))];
[self removeObserver:self forKeyPath:NSStringFromSelector(@selector(logFilesDiskQuota))];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be cleaner if we override setLogFilesDiskQuota instead of using KVO?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be cleaner. I just tried to adjust to existing code. Someone knows, why KVO is used for maximumNumberOfLogFiles? Any thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there would be some comment explaining the choice if KVO was really needed.

Let's merge it for now and we can discuss this in another pull request.

rivera-ernesto pushed a commit that referenced this pull request Jul 2, 2014
DDFileLogger: adding `logFilesDiskQuota` property. Fixes #195
@rivera-ernesto rivera-ernesto merged commit 54566a7 into CocoaLumberjack:master Jul 2, 2014
@bpoplauschi bpoplauschi added this to the 1.9.2 milestone Jul 2, 2014
@dvor dvor deleted the issue195--adding-logfiles-disk-quota branch July 2, 2014 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants