Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > How do I silence or filter a system log message?

How do I silence or filter a system log message?
Thread Tools
Prijker
Forum Regular
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 19, 2003, 08:44 PM
 
In order to keep my systen.log file as small as possible (mine is 452 Kb right now), i wonder if it is possible to filter what messages the system should write to its log files.

I am not sure it would make any difference in terms of speed, but when i want to consult my huge system.log file, the case is it's sometimes hard to find what i want!

Some of those messages are really obstructive, like the almost constant 'fix-prebinding error'. Another case is the messages from the Renicer utility, which sends a message line to system.log each time it renices something.

And those messages happen dozens of times each day! For example, Renicer does it each time i switch to another app!

Well, i would like to shut those useless messages off. How can i do that?

PS.I am a kind of unix newbie, so please explain it the easy way...

Thanks

vic
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Jan 20, 2003, 02:40 AM
 
The file /etc/syslog.conf controls what messages get logged and where.

You can edit this file to reduce the log level.
Each line in the file consists of a number of message levels followed by the path of the file the messages should be logged to.

For example, a typical system.log entry might look like:

*.notice;*.info;authpriv,remoteauth,ftp.none;kern. debug;mail.crit /var/log/system.log

meaning all ".notice', ".info", authpriv, and remoteauth messages, as well as generic ftp messages (ftp.none), kernel debug messages (kern.debug), and critical mail messages (mail.crit) are logged to /var/log/system.log

The trouble is that 'fix-prebinding' messages are, I believe, in the category 'kern.debug'.
Disabling this category (by removing the entry from this line) will also filter other kernel messages that might be more important.

If you truly want to remove these messages, remove the kern.debug from the /var/log/system.log line, then:

killall -HUP syslog

to have the changes take effect.

Alternatively, you can try to fix the problem that's causing the messages to log in the first place. Prebinding issues can usually be fixed by running:

sudo update_prebinding -root /

in a terminal window and letting it do it's job.
Gods don't kill people - people with Gods kill people.
     
kvm_mkdb
Mac Elite
Join Date: Oct 2000
Location: Caracas, Bolivarian Republic Of Venezuela
Status: Offline
Reply With Quote
Jan 20, 2003, 04:42 AM
 
As Camelot, said - it's the /etc/syslog.conf file.
Comment out the line that ends with '/var/log/system.log' (put a # at the beginning) and put this line in:
Code:
*.crit /var/log/system.log
Then type in the terminal:
Code:
sudo killall -HUP syslogd
This way only truly important messages will be logged.

Contra a barbárie, o estudo; Contra o individualismo, a solidariedade!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:24 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,