1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 01:26:11 +02:00

Added SwiftMailerHandler, added write to MailHandler

This commit is contained in:
Gyula Sallai
2011-04-25 01:48:12 +02:00
parent 1279194192
commit a1bc483041
3 changed files with 75 additions and 9 deletions

View File

@@ -75,6 +75,23 @@ abstract class MailHandler extends AbstractHandler
{
return $this->messageFormat;
}
/**
* Send a mail with the given content
*
* @param string $content
*/
abstract protected function send($content);
/**
* {@inheritdoc}
*/
protected function write(array $record)
{
$content = $record['message'];
$this->send($content);
}
/**
* Create a message to send from the given log entry messages
@@ -129,11 +146,4 @@ abstract class MailHandler extends AbstractHandler
return 'Application logs:\n %records%';
}
/**
* Send a mail with the given message
*
* @param string $message
*/
abstract protected function send($message);
}