Software Icon PHP-Script-Logit - PHP Logging tool for PHP Debugging

A very useful PHP debugging tool!

» Download PHP-Script-Logit «



About PHP-Script-Logit

PHP-Script-Logit Screen Shot

PHP-Script-Logit is a great little logging tool for PHP debugging. For those of you who, like me, develop PHP in Notepad, it's really nice to have a little logging tool to keep a watch on what is going on in running PHP scripts. Just use the simple Logit function together with this desktop tool to monitor your PHP scripts.

The desktop app is very simple and requires no installation. The PHP logging script is under ten lines of PHP. Perfect for anyone who does not developed PHP in an IDE

Actually, this tool will work with any type of textual log file - so long as the log file ends with a .log or .txt extension. It simply watches a file for changes and then loads the new changes in the text window, scrolling to the latest information.

PHP-Script-Logit Instructions

First, download the program to your utilities folder (wherever you keep little utilities that do not require installation).

Next, add some logging code to your PHP files with a function like this:

// Appends a line to an external log file
// to be viewed from a desktop monitoring window
// http://free-backup.info/php-script-logit.html
function logit($val, $log = "php-logging-data.log"){ 
 if(trim(strtolower($val))==="clear") unlink($log);
 else if($logfile = fopen($log, "a")) {
  fwrite($logfile, "$val\n");
  fclose($logfile);
 }
}

Now just use call "logit" periodically to dump information to your logfile and to be displayed in the desktop viewing window.

To clear the log file, either click the "Clear" button (CTRL-D) in the viewing window or send the logit command:

logit("clear");

To uninstall PHP-Script-Logit: right-click inside the program and select "Prepare to Delete...". This will remove the registry key so that you can simply delete the exe file. PHP-Script-Logit doesn't store much in the registry, only the form position and the location of the last log file (so that it can display the log as soon as it starts).


Looking for other cool free tools? We've got lots of great stuff around here, including some useful PHP scripts like this script to generate PAD files: PAD-Script. Also you'll find lots of free data recovery software and some original freeware backup software. Enjoy!