mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16: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)
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
parent::write($record);
|
parent::write($record);
|
||||||
|
$res = $this->getResource();
|
||||||
|
if (is_resource($res)) {
|
||||||
|
@fread($res, 2048);
|
||||||
|
}
|
||||||
$this->closeSocket();
|
$this->closeSocket();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -255,6 +255,14 @@ class SocketHandler extends AbstractProcessingHandler
|
|||||||
return (string) $record['formatted'];
|
return (string) $record['formatted'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return resource|null
|
||||||
|
*/
|
||||||
|
protected function getResource()
|
||||||
|
{
|
||||||
|
return $this->resource;
|
||||||
|
}
|
||||||
|
|
||||||
private function connect()
|
private function connect()
|
||||||
{
|
{
|
||||||
$this->createSocketResource();
|
$this->createSocketResource();
|
||||||
|
Reference in New Issue
Block a user