Debugging With Better Error Logs

Debug logs. Super helpful yet super annoying to look at and sometimes try to find what you need to. Well, if you have not heard of it yet let me introduce you to Pimp my log.

Just as its title suggests, this app gives you a much better view of all your log files, from PHP to NGINX and Apache. Several customization options to fit your needs, my favorite so far is setting the time zone to be my own and not the servers!

Why use it?

Well, from their own site,

Pimp my Log is a web app written in PHP. It displays server logs friendly.

I do most of my development locally in Vagrant, and the default debug.log file sucks to look at.

default log file view
Lame Default Log

Enter the fix, a super simple setup, and local log files are much easier to read and I have not even begun playing with all the configuration yet.

pimp my log view
Pimped Out Log View

Being that I wanted this setup for local WordPress development inside of VVV, here is what I did.

Open a terminal and head to your vagrant directory for the install where you want badass logs,

cd /Users/thatryan/vagrant/www/EXAMPLE/htdocs

Clone the repo

git clone https://github.com/potsky/PimpMyLog.git

Dudes, you are mostly done already. Now visit that site install and append the pimp directory,

http://example.dev/PimpMyLog/

At this point it will show you a config screen, you should be able to click the “let me do it for you” and just go to town.

You may need to edit the file config.user.php to point to your specific site error log path, example:

"path" : "\/srv\/www\/example\/htdocs\/wp-content\/debug.log",

Enjoy!

Ryan Oson

I am a front-end developer with a love for WordPress. I am a total coffee fiend and may be addicted to Destiny 2 on PS4.

Leave a Reply

Your email address will not be published. Required fields are marked *