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

Use Cocoalumberjack when it's available (via Cocoapods) #167

Open
fatuhoku opened this issue Jan 18, 2015 · 3 comments
Open

Use Cocoalumberjack when it's available (via Cocoapods) #167

fatuhoku opened this issue Jan 18, 2015 · 3 comments

Comments

@fatuhoku
Copy link

I use Cocoalumberjack for its log levels, and its corresponding IDE colorization. libPusher has no understanding of this and its output sticks out like a sore thumb.

screen shot 2015-01-18 at 13 30 11

It'd be great if CocoaLumberjack was used for those bits of log output.

@lukeredpath
Copy link
Contributor

Is it possible to make use of CocoaLumberjack without making it a project dependency?

@orta
Copy link

orta commented Jan 21, 2015

You could use #if __has_include(<FacebookSDK/FacebookSDK.h>) to see if it's available, then fake an object like it in source to call the methods. ( Probably, not tested this. )

@lukeredpath
Copy link
Contributor

Hmm, how about this as a proposed solution:

libPusher defines a logging macro and uses it internally, e.g. :

#define LIB_PUSHER_LOG(fmt, ...) NSLog(fmt, ##__VA_ARGS__)

If people want to override this, they can redefine it:

#undef LIB_PUSHER_LOG
#define LIB_PUSHER_LOG(fmt, ...) DDLogInfo(fmt, ##__VA_ARGS__)

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

No branches or pull requests

3 participants