Tip: Log console messages

Several times I have been really annoyed when there are messages printed to console which pass by too fast for me to be able to read, or are too long to copy down. But yesterday I found a solution:

in /etc/syslog.conf

Code:
# uncomment this to log all writes to /dev/console to /var/log/console.log
console.info                        /var/log/console.log

Then create the corresponding log file, or syslogd will fail to start.
Code:
# touch /var/log/console.log

[cmd=""]/etc/rc.d/syslogd restart[/cmd]

And now your console messages will be logged to console.log for you to read when you have plenty of time, a nice editor or what ever else was the problem before.
 
I have used this tip for a long time, it is great If you don't have access to the physical console.
 
That's very helpful. Now, how can I prevent all of those messages from being shown in the console? I'd like to hide certain info from being shown on the terminal, like the IP address from DHCP, which services load, etc.

I commented out the following line in /etc/syslog.conf, but the messages still appear:
Code:
#*.err;kern.*;auth.notice;authpriv,remoteauth,install.none;mail.crit             /dev/console
 
Back
Top