1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
George Mponos
e2a3122e10 Parameter formatter was never set.. would cause fatal 2018-12-09 22:17:36 +02:00
Jordi Boggiano
4a33226f25 Wrap up type-hint adding to all handlers 2018-11-19 23:28:33 +01:00
Jordi Boggiano
073c5d763a Merge branch '1.x' 2018-11-04 18:40:32 +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
Jordi Boggiano
06143b03e5 Add a bunch of return types and fix type inconsistencies reports from phan 2018-07-04 14:14:08 +02:00
Jordi Boggiano
1417e2d183 Merge branch '1.x' 2017-06-19 02:16:33 +02:00
Jordi Boggiano
357ae23fa4 Tweak HandlerWrapper example in docblock, fixes #991 2017-06-19 01:51:14 +02:00
Jordi Boggiano
21dde4dedb Move to strict mode and fix tests 2016-05-27 13:44:00 +01:00
Andrzej Kupczyk
04dedae4a8 Fixed $handler property visibility
According to the given example, $handler property should not be private.
2016-04-15 17:52:32 +01:00
Andrzej Kupczyk
b18092d4a2 Fixed $handler property visibility
According to the given example, $handler property should not be private.
2016-04-15 18:45:46 +02:00
Jordi Boggiano
127d7720c9 CS fixes 2016-03-01 18:00:33 +00:00
Jordi Boggiano
3d30ba5ecc Add some return type hints and fix up HandlerWrapper 2016-03-01 17:35:54 +00:00
Alexey Karapetov
c688ff17eb HandlerWrapper 2016-03-01 15:59:22 +00:00