Search code examples
objective-cconsolenstextfieldnslog

Objective C: Display log in NSLabel or NSTextField


Is there a way to display the console log (where all the NSLogs are displayed) continuously in an NSLabel or a continuously scrolling NSTextField?

There are important messages in the console I would like to print that are sent by the machine (not the NSLogs I call myself), that's why I would like to do this.


Solution

  • Well if you are trying to get the info outside of xcode, you could always launch it from terminal to see what it spits out.

    1. Open Terminal.app
    2. type /path/to/your.app/Contents/MacOS/your

    It will display NSLogs and errors that are spit out.