mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 12:47:39 +02:00
Merge branch '1.x'
This commit is contained in:
@@ -241,6 +241,10 @@ class SlackHandler extends SocketHandler
|
||||
protected function write(array $record)
|
||||
{
|
||||
parent::write($record);
|
||||
$res = $this->getResource();
|
||||
if (is_resource($res)) {
|
||||
@fread($res, 2048);
|
||||
}
|
||||
$this->closeSocket();
|
||||
}
|
||||
|
||||
|
@@ -255,6 +255,14 @@ class SocketHandler extends AbstractProcessingHandler
|
||||
return (string) $record['formatted'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return resource|null
|
||||
*/
|
||||
protected function getResource()
|
||||
{
|
||||
return $this->resource;
|
||||
}
|
||||
|
||||
private function connect()
|
||||
{
|
||||
$this->createSocketResource();
|
||||
|
Reference in New Issue
Block a user