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

Read Access to DDLog loggers #217

Closed
PSchu opened this issue Feb 12, 2014 · 7 comments
Closed

Read Access to DDLog loggers #217

PSchu opened this issue Feb 12, 2014 · 7 comments
Milestone

Comments

@PSchu
Copy link

PSchu commented Feb 12, 2014

It would be nice to get read access to the loggers you add to DDLog.
This would enable you to access the fileLogger and especially its logFileManager.

@dvor
Copy link
Member

dvor commented Feb 12, 2014

Well, after adding logger to DDLog you can save needed logger to a variable and access it later.

However, requested feature can be easily added. I can create two methods for that - sync and async. @bpoplauschi @rivera-ernesto what do you think about that?

NSArray *loggers = [DDLog allLoggers];

[DDLog allLoggersWithBlock:^(NSArray *loggers) {
}];

@bpoplauschi
Copy link
Member

I can't think of a good reason why we shouldn't expose that list, but my gut is telling me not to do it. Just a hunch

@dvor
Copy link
Member

dvor commented Feb 12, 2014

All loggers are added by user - there's no sense to prohibit access to them.

This can be useful, for example, for doing something with log files (e.g. sending them to server). User would have ability to access fileLogger at any time without saving pointer to it.

@PSchu
Copy link
Author

PSchu commented Feb 12, 2014

That's exactly the reason I would like this feature. The set up of lumberjack is in a helper class. At the moment I need to pass the fileLogger Pointer all the way to where I sent the crash report.

@bpoplauschi
Copy link
Member

Issue fixed by #219. Please wait for a new Lumberjack version (waiting for #218)

@rivera-ernesto
Copy link
Member

@PSchu In the mean time give a try to the pre-release version to check that it works for you please:

pod 'CocoaLumberjack', :head

@PSchu
Copy link
Author

PSchu commented Feb 14, 2014

Works just fine Thx

@bpoplauschi bpoplauschi added this to the 1.8.1 milestone Feb 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants