Skip to content

Commit f9d56fd

Browse files
committed
Prepare changelog
1 parent e530919 commit f9d56fd

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### 2.0.1 (2019-11-13)
22

33
* Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable
4-
* Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler and SamplingHandler
4+
* Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler, OverflowHandler and SamplingHandler
55
* Fixed BrowserConsoleHandler formatting when using multiple styles
66
* Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings
77
* Fixed normalization of SoapFault objects containing non-strings as "detail"

Diff for: src/Monolog/Handler/BufferHandler.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Christophe Coevoet <[email protected]>
2525
*/
26-
class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface
26+
class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface
2727
{
2828
use ProcessableHandlerTrait;
2929

@@ -135,7 +135,7 @@ public function reset()
135135
/**
136136
* {@inheritdoc}
137137
*/
138-
public function setFormatter(FormatterInterface $formatter)
138+
public function setFormatter(FormatterInterface $formatter): HandlerInterface
139139
{
140140
$this->handler->setFormatter($formatter);
141141

@@ -145,7 +145,7 @@ public function setFormatter(FormatterInterface $formatter)
145145
/**
146146
* {@inheritdoc}
147147
*/
148-
public function getFormatter()
148+
public function getFormatter(): FormatterInterface
149149
{
150150
return $this->handler->getFormatter();
151151
}

Diff for: src/Monolog/Handler/OverflowHandler.php

+20-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Monolog\Handler;
1313

1414
use Monolog\Logger;
15+
use Monolog\Formatter\FormatterInterface;
1516

1617
/**
1718
* Handler to only pass log messages when a certain threshold of number of messages is reached.
@@ -33,7 +34,7 @@
3334
*
3435
* @author Kris Buist <[email protected]>
3536
*/
36-
class OverflowHandler extends AbstractHandler
37+
class OverflowHandler extends AbstractHandler implements FormattableHandlerInterface
3738
{
3839
/** @var HandlerInterface */
3940
private $handler;
@@ -124,4 +125,22 @@ public function handle(array $record): bool
124125

125126
return false === $this->bubble;
126127
}
128+
129+
/**
130+
* {@inheritdoc}
131+
*/
132+
public function setFormatter(FormatterInterface $formatter): HandlerInterface
133+
{
134+
$this->handler->setFormatter($formatter);
135+
136+
return $this;
137+
}
138+
139+
/**
140+
* {@inheritdoc}
141+
*/
142+
public function getFormatter(): FormatterInterface
143+
{
144+
return $this->handler->getFormatter();
145+
}
127146
}

0 commit comments

Comments
 (0)