What are the commands for adding the MAMP Apache, PHP and MySQL error logs to the MacOSX Console?
Thanks!
What are the commands for adding the MAMP Apache, PHP and MySQL error logs to the MacOSX Console?
Thanks!
Similar to this question...
Console has a few standard locations where it will look for and index log files. The easiest thing you can do is add a symbolic link from the MAMP log files into one of the directories Console already uses, like ~/Library/Logs.
For example, my MAMP log files are located in /Applications/MAMP/logs. So I did:
cd ~/Library/Logs
ln -s /Applications/MAMP/logs/php_error.log .
ln -s /Applications/MAMP/logs/apache_access_log .
Hope that helps!
Do you mean Console.app? If so, click File/Open. If MAMP's logs are in a location that's not shown in the standard "open file" dialog, use Cmd-Shift-G to open a text field you can type the path into.
Console should remember the log files, so you can simply click them on the list at the left the next time you run it.
It looks like they changed the behavior in the console app!! It used to be that you could just throw a symlink to a directory and the contents would show up in Console, but:
On El Capitan, Console doesn't follow symlinks to directories full of log files, it shows the directory but not the contents... so I have found it works really well to do this:
cd ~/Library/Logs
mkdir MyNewLogsFolder
cd MyNewLogsFolder
ln -s /path/to/logs/folder/*.log .
That will create a new entry in the left-side quick-access bar in Console and fill it with symlinks to the log files in your original logs directory.
It's quick and easy and works consistently across all versions of OS X.