Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am checking system logs via the Console utility. I am wondering what the difference is between the console.log and system.log file?

share|improve this question
    
I don't see a console.log file OMM. Where is the file located? –  Nathan Greenstein Feb 24 '11 at 3:27
    
@Nathan - I goofed. This applies to pre-Snow Leopard versions. Now there is just system.log as the main system event log. Apparently, ALS spits out system.log in plain text and stores another version in a binary database format. –  Scott Davies Feb 24 '11 at 3:44
add comment

2 Answers 2

up vote 3 down vote accepted

Console.log is usually written to by calls to Apple's NSLog() function call. (I can't find any other way to write to it so might be the only way) This writes to the log of the user that the app is running as

system.log is written to by the unix call syslog. syslog can be configured to write to different files and machines. system.log is a central file written to by all users.

Thus only code written specifically for OSX will write to console.log and only by the current user.

syslog is used by pure unix apps and if you want central logging.

OSX since 10.4 actually writes the logs to a database using asl

share|improve this answer
    
This is great stuff - thank you! So if I'm getting this correctly, system.log would be all the xnu/Mach/BSD system log data (UNIX subsystem), while console.log is just calls from Objective-C/Cocoa apps ? Thanks for correcting my acronym...ASL! –  Scott Davies Feb 25 '11 at 21:32
    
Not completely you can call syslog or the apple asl logging from Cocoa so anything can be in syslog –  Mark Feb 26 '11 at 0:26
add comment

Generally, the Console log contains log messages from processes owned by the currently logged-in GUI user, whereas the System log contains log messages from system processes owned by root or other "system accounts" (e.g. "nobody", "www", etc.).

share|improve this answer
    
Thanks! So based on my comment to @Mark above, the system accounts (running system processes), are from the UNIX layer ? –  Scott Davies Feb 25 '11 at 21:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.