%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /usr/share/doc/cpanel-php81-log/examples/ |
Upload File : |
<?php
require_once 'Log/observer.php';
class Log_observer_mail extends Log_observer
{
var $_to = '';
var $_subject = '';
var $_pattern = '';
function Log_observer_mail($priority, $conf)
{
/* Call the base class constructor. */
$this->Log_observer($priority);
/* Configure the observer. */
$this->_to = $conf['to'];
$this->_subject = $conf['subject'];
$this->_pattern = $conf['pattern'];
}
function notify($event)
{
if (preg_match($this->_pattern, $event['message']) != 0) {
mail($this->_to, $this->_subject, $event['message']);
}
}
}
?>