compared with
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History
* This component *will* adhere to standard Zend_Log_Writer formatting and filtering conventions
* This component *will* allow for a minimum of a plaintext message body, with an optional HTML message body
* This component *will* dynamically set mail subject to include the number of entries that occurred per-priority level if the caller so chooses
* This component *will not* open connections to the Zend_Mail transport until a message is ready to be sent
* This component *will not* allow for on-demand mailing of log entries

$mail = new Zend_Mail();
$mail->setDefaultTransport(new Zend_Mail_Transport_Smtp());
// Note that a subject is NOT set on Zend_Mail object

// Use default HTML layout.
$layout = new Zend_Layout();

// Instantiate writer with use of layout.
$mailWriter = new Zend_Log_Writer_Mail($mail, $layout);

// Email warnings and higher to recipients.

// Set subject prepend text; entry counts will be appended
// to the mail subject string upon shutdown() of the writer.
$mailWriter->setSubjectPrependText('Video transcoding -- ERRORS');

// Create instance of Zend_Log.
$log = new Zend_Log();
$log->info('processing item X');
$log->err('failed to connect to video transcoding service');
$log->info('shutting down');