Back in the day, prior to Leopard, there was a console.log file, which contains errors and messages for the current user's account. When Leopard came around, this file was removed, and the system-wide logging system (ASL) replaced it. Those messages are still recorded, but when you view logs in Console, you can't see them on their own. Terminal (Terminal.app) is the terminal emulator included in the macOS operating system by Apple. Terminal originated in NeXTSTEP and OPENSTEP, the predecessor operating systems of macOS. As a terminal emulator, the application provides text-based access to the operating system, in contrast to the mostly graphical nature of the user experience of macOS, by providing a command line interface. Mac OS X Tips points out that in Mavericks there's an easy way to launch Terminal directly from a folder of your choosing now. Mac: By default, Terminal always launches into your home directory.
View console log in Terminal | 13 comments | Create New Account
Click here to return to the 'View console log in Terminal' hint |
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I don't know why you would go to Terminal to do this. It's a lot easier to view it using the Console app. It has a full GUI--you can scroll around, search, and save.
Remote access over ssh for example?
Because Console no longer offers this view. It lumps all messages together.
---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Unless I'm missing the point of this hint, you can view individual logs - console.app just defaults to an 'All Messages' smart filter.
You could probably also (with a bit of manpage reading) re-establish the old console.log by adding an appropriate entry in /etc/syslog.conf
edit Although now that I've done some quick searching, it looks like that's easier said than done; lots of 'how do I do this' but no 'this is how I did it' articles.
edit Although now that I've done some quick searching, it looks like that's easier said than done; lots of 'how do I do this' but no 'this is how I did it' articles.
Am I missing something?
tail /var/log/system.log
tail /var/log/system.log
syslog -C | open -f
opens the syslog in TextEdit where you can view, search, etc.
Me, I usually pipe things like this
syslog -C | bbmore
where 'bbmore' is
alias bbmore='bbedit --clean --view-top --new-window -t ''Unix output''
opens the syslog in TextEdit where you can view, search, etc.
Me, I usually pipe things like this
syslog -C | bbmore
where 'bbmore' is
alias bbmore='bbedit --clean --view-top --new-window -t ''Unix output''
What's different between this and the stock 'Console Messages' query provided by Console.app (in the 'Show Log List' sidebar)? That query certainly looked to me like the same thing as the old console.log file (and it looks like a prettier version of what syslog -C outputs).
Or have OS versions post-10.5 removed the 'Console Messages' query and just left the 'All Messages' one?
That said, syslog -C does look like a handy tip for ssh usage, where I have bemoaned the loss of the console.log file.
Or have OS versions post-10.5 removed the 'Console Messages' query and just left the 'All Messages' one?
That said, syslog -C does look like a handy tip for ssh usage, where I have bemoaned the loss of the console.log file.
As I say in the hint, when Leopard came around, they removed that from Console.
---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Sorry, looking back I see I wasn't clear.
I was talking about the 'Console Messages' item that's present by default in the sidebar starting on 10.5, replacing the item for 'console.log' (the file), which was removed on 10.5.
The 'Console Messages' item most certainly is present on 10.5; it was introduced then, not removed then ;-) Has it been removed post-10.5, as my second paragraph asked?
I was talking about the 'Console Messages' item that's present by default in the sidebar starting on 10.5, replacing the item for 'console.log' (the file), which was removed on 10.5.
The 'Console Messages' item most certainly is present on 10.5; it was introduced then, not removed then ;-) Has it been removed post-10.5, as my second paragraph asked?
I didn't have a 'Console Messages' item in my log list on Lion, but I was able to re-create it by going to 'File' > 'New System Log Query...' and adding the condition:
[ Facility ] [ is equal to ] com.apple.console
That matches the behavior of 'syslog -C', according to the syslog man page (and my own brief testing).
[ Facility ] [ is equal to ] com.apple.console
That matches the behavior of 'syslog -C', according to the syslog man page (and my own brief testing).
Great find.
Interestingly, the Terminal output is more readable. For example, in mine right now:
May 31 23:39:11 Walden [0x0-0x1ee1ee].com.apple.Safari[4862] <Notice>: May 31 23:39:11 Walden.local WebProcess[4864] <Error>: CGContextSetLineDash: invalid dash array: at least one element must be non-zero.
--- last message repeated 83 times ---
May 31 23:39:12 Walden [0x0-0x1ee1ee].com.apple.Safari[4862] <Notice>: May 31 23:39:12 Walden.local WebProcess[4864] <Error>: CGContextSetLineDash: invalid dash array: at least one element must be non-zero.
--- last message repeated 19 times ---
Whereas Console shows each of the repetitions.
Interestingly, the Terminal output is more readable. For example, in mine right now:
May 31 23:39:11 Walden [0x0-0x1ee1ee].com.apple.Safari[4862] <Notice>: May 31 23:39:11 Walden.local WebProcess[4864] <Error>: CGContextSetLineDash: invalid dash array: at least one element must be non-zero.
--- last message repeated 83 times ---
May 31 23:39:12 Walden [0x0-0x1ee1ee].com.apple.Safari[4862] <Notice>: May 31 23:39:12 Walden.local WebProcess[4864] <Error>: CGContextSetLineDash: invalid dash array: at least one element must be non-zero.
--- last message repeated 19 times ---
Whereas Console shows each of the repetitions.
---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Mac Os X Terminal Search For File
Bring it straight into vim via:
:r ! syslog -C
-ccs
:r ! syslog -C
-ccs