Created
July 2, 2011 22:30
-
-
Save zircote/1061734 to your computer and use it in GitHub Desktop.
A Prowl Log Writer for Zend_Log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$prowl = array( | |
'apikey' => '072a7159e...e36ebe57', | |
// 'apikey' => array('072a7159e...e36ebe57','072a7159e...e36ebe57','072a7159e...e36ebe57'), //for multi-keys | |
'priority' => Skulk_Client_Message::PRIORITY_EMERGENCY, // optional | |
'url' => 'http://www.zircote.com/admin/console', // optional url to forward the user to. | |
'event' => 'Error logging via Prowl with Zend_Log', // optional Your message header | |
// 'providerkey' => '072a7159e9e8f......e7765cd11c229e36ebe57' // optional | |
); | |
$prowlWriter = Skulk_Log_Writer_Prowl::factory($prowl); | |
$prowlWriter->addFilter(new Zend_Log_Filter_Priority(Zend_Log::EMERG)); | |
$zendLog = new Zend_Log($prowlWriter); | |
$zendLog->info('This wont be sent'); | |
$zendLog->emerg('this is a emerg test 1'); | |
$zendLog->emerg('this is a emerg test 2 '); | |
$zendLog->emerg('this is a emerg test 3 '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$prowl = array( | |
'apikey' => '072a7159e...e36ebe57', | |
'priority' => Skulk_Client_Message::PRIORITY_NORMAL, | |
'url' => 'http://www.zircote.com/admin/console', | |
'event' => 'Error logging via Prowl with Zend_Log', | |
// 'providerkey' => '072a7159e9e8f......e7765cd11c229e36ebe57' | |
); | |
$tansport = new Skulk_Mail_Transport_Prowl($prowl) | |
$mail = new Zend_Mail(); | |
$mail->setBodyText('this is a skulk test') | |
->send($transport); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment