Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding custom log locations to the OS X console application

After searching online, the best solution I've found so far is to just make a symbolic link in either "/Library/logs/" or "~/Library/logs/" to get it to show up in the Console application.

I'm wondering if it would be possible to add a new directory or log file to the "root" level directly under the "LOG FILES" section in the console.

Here's a quick screenshot:

OS X Console

like image 983
Wilco Avatar asked Sep 28 '08 06:09

Wilco


People also ask

Where are Mac application logs stored?

“~Library/Logs” is your current Mac user account's user-specific application log folder, “/Library/Logs” is the system-wide application log folder, and “/var/log” generally contains logs for low-level system services. The search bar works to filter these log files, too.


1 Answers

There is one way to get your log files into the console.

You can add a symlink to the log file or log directory to one of the directories in the list. The directory ~/Library/Logs seems like the logical choice for adding your own log files.


For myself I wanted easy access to apache2 logs. I installed apache2 using macports and the default log file is located at /opt/local/apache2/logs.

Thus all I did was create the symlink to that directory.

# cd ~/Library/Logs # ln -s /opt/local/apache2/logs/ apache2  

Now I can easily use the console.app to get to the logs.

like image 75
Tao Zhyn Avatar answered Oct 07 '22 09:10

Tao Zhyn