On Mac OS X, how do I clear out Console.app?
Solution 1
Clear the logs in /private/var/log - especially system.log. That file gets quite large. Then delete data in Macintosh HD/Users/"your user name"/Library/Logs. Delete everything in there. Next, go to Macintosh HD/Library/Logs and delete everything in there, too. It's safe to delete these log files and will not affect system performance.
Solution 2
Basically, it sums up to this:
- Applications can use the syslog API (bsd_in) and the asl API (asl_in) to log messages by handing them over to the syslog daemon (syslogd). Other data that gets logged can come from the kernel (klog_in) or from the network (udp_in).
- All of these messages are handled by syslogd, which outputs log messages both the BSD way (bsd_out: it writes stuff into various basic log files like /var/log) and into a unified log message store (asl_action: the message store is in /var/log/asl/*).
- Console displays both kinds of logging facilities: "classical" log files and database searches. Even if you delete all .log files, the database is still intact and full of entries.
Also, if you want to troubleshoot, there should be no need to clear old log files, you will only have to be more specific over what you want to read from the log. A good starting point would be using "syslog" (not syslogd!) from the command line, where you can parse logs with more specific instructions (have a look at man syslog). So if you were to parse all messages logged by Safari in the last 5 hours you would run:
syslog -k Facility -k Time ge -5h -k Sender Safari
or to see all messages, but not those of Mail:
syslog -k Facility -k Sender ne Mail
Trust me, even though this might look confusing, it´s far better to read logs on the command line than in Console.app
But if you want to keep on using Console you still might want to checkout the man page for aslmanager and syslog.conf to see how you can eg. configure where the files are kept, for how long, and how to archive them.
Related videos on Youtube
cwd
Updated on September 17, 2022Comments
-
cwd over 1 year
I'm trying to use Console.app to debug some problems on my Mac. I've cleared out the log files from inside
/Library/Logs
and~/Library/Logs
but I still have around 4000 messages left! I tried the Clear Display button but that only clears the application temporarily.How do I clear out the log?
-
Dennis Williamson about 13 yearsWhat does that big Clear Display button do?
-
peelman about 13 yearsYou do realize the messages are written chronologically...why not just identify the log you actually need to look at, select it, then sort by date/time? Or even better, open Terminal, and use
tail -f /var/log/logname
to watch it...
-
-
cwd about 13 yearsNice! I did have to delete everything inside of /private/var/log - even the archive files, but then it worked. Thanks!
-
Kevin Worthington about 13 yearsI'm glad it helped!