1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-04 20:27:31 +02:00

21 Commits

Author SHA1 Message Date
Jordi Boggiano
a335f6f1a5 Fix tests for TestHandler reset support 2018-11-30 08:43:17 +01:00
Grégoire Pineau
0625068bf0 Added a new ResettableInterface and implemented it where possible.
When one use Monolog in a long process like an AMQP worker with a
`FingersCrossedHandler` or `BufferHandler` there is a drawback: as soon as there
is an AMQP message that generate a log >= error (for example), all next AMQP
messages will output logs, even if theses messages don't generate log where
level >= error.

In the same context there is a drawback for processor that add an UUID to the
logs. The UUID should change for each AMQP messages.

---

This patch address this issue with a new interface: `ResettableInterface` interface.
Side note: `reset()`, `flush()`, `clear()`,  are already used in Monolog. So
basically, one can use the `reset()` on the `Logger` and on some
`Handler`s / `Processor`s.

It's especially useful for

* the `FingersCrossedHandler`: it `close()` the buffer, then it `clear()` the buffer.
* the `BufferHandler`: it `flush()` the buffer, then it `clear()` the buffer.
* the `UidProcessor`: it renew the `uid`.
2018-07-06 16:07:13 +02:00
Nils Adermann
e7c326782f FingersCrossed: Adapt test for extraction of activate from handle() 2016-04-15 14:11:04 -04:00
Nils Adermann
e0b521ba53 Add a test that verifies manual overriding of activation strategy works 2016-04-14 17:02:29 -04:00
Reinier Kip
162c30768d Allow PSR-3 passthru level in FingersCrossedHandler. 2015-05-11 13:26:40 +02:00
Jordi Boggiano
feb19af2d4 Add support for PSR-3 levels to all public APIs accepting levels, fixes #421 2014-09-30 13:59:45 +01:00
David Simon
b1216b8d45 Allowing some messages to always be flushed from FingersCrossedHandler 2014-05-27 11:26:42 -04:00
Jordi Boggiano
392ef35fd4 CS fixes 2014-03-23 20:50:26 +01:00
Jordi Boggiano
050bb52fd8 Fix a few details and add docs to the ChannelLevelActivationStrategy, refs #186 2013-07-17 18:11:27 +02:00
Mike Meessen
690bbdb2ff Refactored / Renamed the CategoryErrorLevelActivationStrategy to the
more appropriate ChannelLevelActivationStrategy.
2013-04-30 10:57:25 +02:00
Mike Meessen
c72aff2238 Added CategoryErrorLevelActivationStrategy, which enables setting the
Error Level threshold per log channel.
2013-04-29 14:52:29 +02:00
Jordi Boggiano
5feb21ae1a Fix Buffer, Group and FingersCrossed handlers to make use of their processors, fixes #170 2013-03-17 19:36:02 +01:00
Jordi Boggiano
908d7734e7 Added test, updated changelog 2012-04-22 12:46:58 +02:00
Jordi Boggiano
8108272c6c Added @covers annotations to everything 2011-06-29 20:23:08 +02:00
Christophe Coevoet
a75f7963ee Added the possibility to configure whether the FingersCrossedHandler should continue to buffer after being triggered or not
The change is BC as the default is to stop buffering.
2011-05-07 01:28:00 +02:00
Christophe Coevoet
24dc9e91d0 Added a test for the FingersCrossedHandler reset method 2011-04-07 12:54:39 +02:00
Christophe Coevoet
3cb3dbdc8f Made the write method protected
Tests are not a good reason to make it public.
2011-04-06 13:22:06 +02:00
Christophe Coevoet
e32886e26f Fixed callback factory for the FingersCrossedHandler 2011-04-05 10:29:08 +02:00
Jordi Boggiano
6c24217c56 Renamed message to record 2011-02-25 23:01:43 +01:00
Jordi Boggiano
5ab1693f4d Made getLevelName static 2011-02-20 22:44:32 +01:00
Jordi Boggiano
228af6a6cd Documented and tested FingersCrossedHandler 2011-02-20 22:40:45 +01:00