Here is the main window of Pimp My Log :
We are going to take a tour of all features in the menu bar from left to right.
Click on it and the page will be fully reloaded. The configuration file will be reloaded. Hey what a feature!
Click on the refresh button to check for new logs for the selected file.
You can manually refresh logs :
Rkey on a qwerty keyboard
You can display as many files as you want in the same Pimp My Log instance.
Simply choose the one you want to view.
You can set the default loaded file in the configuration file by setting its
file object as the first one in the dictionary
The search input lets you type some words to search in the log file. Stroke key
F to focus on the search input.
The search is done line by line in every full line. The search is not performed on each separated token from a line.
The search is done in a full line of logs. Take this log:
127.0.0.1 - - [21/Dec/2013:22:19:29 +0100] "GET /img/psk.png HTTP/1.1"
The line above will be returned if you search for text
+0100] "GET /img/for example
Simply type something and the text will be searched and displayed.
If the search is a valid regular expression, it will be searched with the PHP
preg_match version. The documentation about patterns is here.
When a RegEx is valid, the search input box becomes pink.
The great thing in PCRE functions is that a RegEx delimiter can be any non-alphanumeric, non-backslash, non-whitespace character.
To get all images from the root /img/ directory for example, you can use these RegEx:
I put a space before the first slash because I don't forget that the RegEx is applied on full lines of logs and a line is something like this
127.0.0.1 - - [21/Dec/2013:22:19:29 +0100] "GET /img/psk.png HTTP/1.1" so to match the
/img directory at root, I know there is a space before. I could write this too:
The search is done from the bottom to the top of log file and Pimp My Log collects matched lines until the number of lines you want to display is reached. The problem is that if you try to find something rare, Pimp My Log will scan the full log file and I am quite sure you have tons of megabytes!
So there is a limitation timer and when Pimp My Log has reach this timer, it returns what it has found. 2 consequences :
You can modify the default timer as explained here.
You can see in the footer 2 interesting things :
2870mswith 331K of logs for example. Ouch! almost 3 seconds to search the expression in my log file. But on the next refresh, duration comes back to
1079skipped line(s) for example. To perform the search, Pimp My Log has rejected 1079 unmatched lines of logs.
If these values are too high and you cannot display what you want to find, change your search expression...
You can ask Pimp My Log to refresh the display automatically. It is really useful with desktop notification. You can leave Pimp My Log in a hidden tab in a window back to all others and you will receive desktop notification when a new log is available. Just click on the desktop notification and Pimp My Log will come on top!
I use these settings when I develop a website:
error.log: auto refresh every second because I want to be alerted as soon as an error is thrown
access.log: no auto-refresh because I don't want to be alerted when apache serves somebody
Don't be afraid to use the 1 second auto-refresh even on production servers. Pimp My Log only performs incremental log scans (except for the first launch).
You can change the number of lines you want to display. Just select in the list the number or log lines you want. Displaying a lot of lines has performance consequences on: - first load - search
On normal usage, Pimp My Log only check for new logs in the log file.
The desktop notification icon is displayed when your browser supports this feature. If browser does not support desktop notification, the notification icon is not displayed.
The notification icon on top right is:
You can see something like this :
13 logs displayed, 2 new logs found in
/opt/local/apache2/logs/access_logwas last modified on
2014/01/09 23:12:39, size is
What does it mean?
13 logs displayed : the number of displayed logs, ok it is easy!
2 new logs found : since the previous refresh, Pimp My Log has found 2 new logs according to the current search
11ms : the time Pimp My Log has spent to do its job in the last refresh
947B of logs : Pimp My Log has parsed this quantity of bytes of logs from the end of the file before stopping and returning results
1 skipped line(s) : the number of skipped lines because they do not match the search
0 unreadable line(s) : the number of lines which do not match the regular expression. It should always be zero!
/opt/local/apache2/logs/access_log : the path of the displayed file
was last modified on
2014/01/09 23:12:39 : its last modification date. Don't be brutal with the refresh button if this date does not change... perhaps you do not display the right file!
7M : the log file size. If you see some gigabytes, perhaps you should take a look on this huge piece of software :-)
Don't be afraid to see a these messages in top of the window:
Pimp My Log cannot find the last line of the log file from the previous scan. So it can be because the log file has been rotated and the new refresh process is done on a bigger file than the previous refresh.
It can happen too when you write manually some data in the log file.
Pimp My Log cannot find the last line of the log file from the previous scan and the file size has decreased.
As a user, each time you change a parameter in the Pimp My Log interface, the URL is refreshed in your browser.
You can save the current view by bookmarking Pimp My Log.
If you click on the Pimp My Log logo at top left, all default settings from the
config.user.json will be used.
Here is the list of supported GET parameters.
The first file defined in your configuration file is displayed by default.
You can change this behaviour by adding a GET parameter in the Pimp My Log url. The GET parameter name is
i and its value is the
fileid of the log file as defined in the configuration file.
http://.../PimpMyLog/?l=fr_FR will load Pimp My Log in French for example.
Supported languages are :
en_GBor empty for English
pt_BRfor portugues do Brasil
Users can override the maximum count of logs by setting a GET parameter named
http://.../PimpMyLog/?w=100 will display a maximum count of 100 logs.
Supported values are pre-defined values ( configuration file value, 5, 10, 20, 50, ...)
Users can override the default notification preference by setting a GET parameter named
http://.../PimpMyLog/?n=false will disable the notification.
Supported views are :
trueto enable notifications
falseto disable notifications
Users can override the auto-refresh value by setting a GET parameter named
http://.../PimpMyLog/?r=1 will refresh every second.
Supported values are pre-defined values ( configuration file value, 1, 2, 5, ...)
Users can launch a search by default by setting a GET parameter named
You can easily change all time values according to your current timezone. By default, all time values are displayed as they are stored in log files, assuming they correspond to the server timezone. The server timezone is normally set in your
If you are currently in an other timezone location and want to display logs according to your current timezone, you can specify your timezone in the GET parameter like this:
All available timezone strings are available here.
Users can override the default view by setting a GET parameter named
http://.../PimpMyLog/?w=false will disable the wide view for example.
Supported views are :
1or `` for a wide view
0for a narrow view