Is there a framework or something that would give my Mac Cocoa app a window with the app’s console output, possibly with some nice formatting and filtering?
Asked
Active
Viewed 171 times
1
-
1How are Xcode's built-in console and Console.app insufficient? – Chuck Jun 28 '12 at 20:06
-
1If it's something the user needs to see, the console falls a bit short since it would require the user to launch it and then filter, and Xcode wouldn't work at all. – paulmelnikow Jun 28 '12 at 20:12
-
Depending on what you want to accomplish, CocoaLumberjack is a tool which may be helpful with the generation, though not the presentation of log messages. https://github.com/robbiehanson/CocoaLumberjack – paulmelnikow Jun 28 '12 at 20:13
-
Yes, these are logs for my users to look at, so Xcode is out of the question. And I'm interested mainly in the presentation part, I am mostly happy with `NSLog` for logging. – zoul Jun 28 '12 at 20:23
1 Answers
1
This is not a common need, so it seems unlikely someone will have a mature implementation just sitting around to take. But implementing it yourself isn't too hard.
However, I would question whether you really want to show all stdout and/or stderr to the user. Libraries and frameworks can be unexpectedly verbose and throw out console messages you might not intend. Having a special logging function that prints to a text view seems like a better idea to me.
-
This is an in-house tool app, so that some verbosity now and then doesn’t matter much. (I’d be happy if the output looks like the Xcode console, so that should work.) The stdout redirection looks nice, thank you. – zoul Jun 29 '12 at 07:00