Log watcher is a PHP class that polls log files and takes newly added lines to send them to a given watcher email address. Although this class can be used to poll any type of log files, it was developed with the intention to overcome a limitation of the PHP error trapping system that is not able to capture certain types of errors during script execution, like script parsing errors or form file uploading failures. It is meant to be used from cron-like task schedulers to poll log files regularly. The email notification message can be composed from text templates. The message delivery function can be replaced by custom functions like the urgent mail function that can be faster for delivering critical messages.
|Tags||Internet Log Analysis Software Development Libraries php classes Diagnostics Logging Monitoring|
|Operating Systems||OS Independent|
Release Notes: This release fixed a bug with not distinguishing real errors when the last read position of the log file was in the beginning.
Release Notes: The message delivery method can be customized now by specifying an alternative to the PHP mail function. The example script was updated to demonstrate how to customize the message delivery method to use the urgent mail function that delivers messages directly to the recipient SMTP server instead of relaying in the local mailer or an intermediate relay SMTP server.
Release Notes: This release adds an example of an error handler function that logs the error message, the filename, the line number, the function name, and the class name, including a backtrace of all the function calls that lead to the line where the error occurred.
No changes have been submitted for this release.