PDA

View Full Version : Never understood what Console.app does



rickyd
20th September 2007, 02:32 PM
Hey guys,

I know its a strange question to ask. But what on earth is Console? At the moment, I'm just intrigued by its cool looking icon :p. After a quick look, I am guessing it just logs messages from some sapplications??

Ricky.

Brains
20th September 2007, 02:37 PM
Console is the lowest level of interface to the kernel, the heart of OS X. Apart from capturing messages to console.log, it is also the 'app' that you see if you boot your Mac into single user mode.

If you're a typical mouse-friendly Mac user, you are advised to stay the bloody hell away from Console :)


B.

rickyd
20th September 2007, 02:41 PM
I was just running one of my own apps (which logs a few integers) and they showed up in Console. I suppose this would be a good way to pinpoint errors a user might be getting on the other end?s

iSlayer
20th September 2007, 02:41 PM
Console is the lowest level of interface to the kernel, the heart of OS X. Apart from capturing messages to console.log, it is also the 'app' that you see if you boot your Mac into single user mode..

Should be noted there is technically 2 console apps in Mac OS X.
One is the one brains refers too and one(console.app) is just a log viewer

forgie
20th September 2007, 03:01 PM
I was just running one of my own apps (which logs a few integers) and they showed up in Console. I suppose this would be a good way to pinpoint errors a user might be getting on the other end?s
Yep, console.app is basically there for logging and debugging information. If your app encounters any errors, it should log them to the console, so that a user (or developer) can get a better idea of what went wrong.

For those in the know: does NSLog send messages to Console.app?

BTW Rickyd: a good practice to get into when writing error/debug messages is to be as specific as possible - an error message that says:

"read error" isn't very helpful

whereas;

"error reading from file: /Users/rickyd/Something/Badfile.file"

Is more helpful.

sendai
20th September 2007, 03:13 PM
For those in the know: does NSLog send messages to Console.app?Yes (in that it sends them to the console which Console.app reads via console.log.)

iSlayer
20th September 2007, 03:14 PM
For those in the know: does NSLog send messages to Console.app?


Yep via console.log by default.

Currawong
20th September 2007, 03:22 PM
Console is the lowest level of interface to the kernel, the heart of OS X. Apart from capturing messages to console.log, it is also the 'app' that you see if you boot your Mac into single user mode.

If you're a typical mouse-friendly Mac user, you are advised to stay the bloody hell away from Console :)


B.

Brains: You're confusing the Terminal with the Console.

Traditionally the console refers to the keyboard and screen connected to a server. There was no user interface, just a Terminal.app like command-line filling the screen. When user interfaces came about for server OSes that allowed multiple windows, there'd always be the console window, to which all feedback, such as warnings or errors, from programs and daemons would be dumped. The latter is what Console.app actually shows initially when you open it.

Console.app also allows you to quickly view logs, either system or user logs, of which they is quite a variety. It can be handy when trying to troubleshoot Mac OS X.

chrism238
20th September 2007, 03:53 PM
Traditionally[/i] the console refers to the keyboard and screen connected to a server. There was no user interface.....Those of us who started with paper tape, punch-cards, and toggle-switches, may have fonder memories of what a real console was ;)