<?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']); } } } ?>
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
composite.php | File | 305 B | 0644 |
|
console.php | File | 149 B | 0644 |
|
display.php | File | 280 B | 0644 |
|
error_log.php | File | 169 B | 0644 |
|
file.php | File | 216 B | 0644 |
|
firebug.php | File | 270 B | 0644 |
|
mail.php | File | 226 B | 0644 |
|
null.php | File | 133 B | 0644 |
|
observer_mail.php | File | 655 B | 0644 |
|
pear_error_handler.php | File | 620 B | 0644 |
|
php_error_handler.php | File | 768 B | 0644 |
|
sql.php | File | 220 B | 0644 |
|
sqlite.php | File | 489 B | 0644 |
|
syslog.php | File | 156 B | 0644 |
|
win.php | File | 208 B | 0644 |
|