How can I make Lumberjack work in AppCode

Hi guys, first of all, thanks very much for a really cool product, I've been using it for ~2 months now, and I'm hooked.

This is the first time I've encountered an issue, and by searching the forum, it looks like other people had it, but I couldn't find the actual fix or workaround.

So basically, I am trying to integrate CocoaLumberjack (https://github.com/robbiehanson/CocoaLumberjack) logging framework into my apps, and it works fine in Xcode, but no messages are being displayed
on the console in AppCode.

Please advise. Thank you.

(please find screenshot attachments of the code and console output's for both AppCode and Xcode)

Also, is there an irc channel for AppCode and / or Jetbrains products in general ?



Attachment(s):
xcode.png
appcode.png
code.png
6 comments
Comment actions Permalink

I suspect this is really too quick, dirty and dangerous to admit to in public, but I got it working by a (temporary!) modification in DDTTYLogger.h. Changing the test the line `isaTTY = isatty(STDERR_FILENO);` to always return YES does the trick for me.

It would be worth following this issue which is the root of the problem.

0
Comment actions Permalink

Thanks very much Crispin, that does seem to fix it. Now, like you mentioned, it is far from a permanent orthodox solution  ;)
Hopefully the root cause will be addressed soon. Cheers.

0
Comment actions Permalink

Alternately, you can use my own NSLogger:

https://github.com/fpillet/NSLogger

and you won't even have to change your code, there is a Cocoa-Lumberjack adapter for it:

https://github.com/steipete/NSLogger-CocoaLumberjack-connector

The output goes to the desktop NSLogger application, and it provides a host of filtering options.

0
Comment actions Permalink

crispinb wrote:

I suspect this is really too quick, dirty and dangerous to admit to in public, but I got it working by a (temporary!) modification in DDTTYLogger.h. Changing the test the line `isaTTY = isatty(STDERR_FILENO);` to always return YES does the trick for me.

It would be worth following this issue which is the root of the problem.

Hi,
Is there a better fix in AppCode for this ?

0
Comment actions Permalink

At the moment, no. We plan to fix this in the next major update: http://youtrack.jetbrains.com/issue/OC-2367

0
Comment actions Permalink

Or you can add a custom DDLogger that just forwards to NSLog: https://gist.github.com/dfaivre/5025120

0

Please sign in to leave a comment.