Error Log Viewer - Description
What is Error Log Viewer?
This free perl script allows you to view your web server's error log. Almost identical to our free Access Log Viewer, Error Log, contains all sorts of useful information about errors and warnings returned by your server that will help you improve as a Perl Programmer and write tighter more efficient code. All you need is a cgi-bin and the path to the error log file on your server. If you do not know the path to your error log, this script package also comes with the code you need to redirect the error messages to your browser. Click on the "Demo" link above to see what the redirected error messages look like. The script you will be calling, included in the package, contains an error in that we did not close a print statement with the ending quote.
The following code is all you really need. It has proved invaluable and has saved our programmers countless hours of debugging. Any time you encounter a Server 500 error, open up the script that is causing it and enter the following code near the top, under the path to Perl. It can be placed anywhere in the script as long as it placed before the error. Each time a script is called, it is entirely compiled then executed. This code will redirect the errors found to STDOUT (your browser) using Perl's built in BEGIN subroutine :
$| = 1;
open (STDERR, ">&STDOUT");
print qq~Content-type: text/html\n\n~;
- Select group of lines to view
- View with or without word wrap
- Characters decoded for easier reading
- Set default values
- Compatible with Windows, Unix, Linux, Sun, BSDOS and OSX Mac servers