pusher/libPusher

Use Cocoalumberjack when it's available (via Cocoapods)

Opened this issue · 3 comments

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.

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

orta commented

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. )

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__)