1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
Jordi Boggiano
073c5d763a Merge branch '1.x' 2018-11-04 18:40:32 +01:00
Jordi Boggiano
531d05a802 Merge branch '1.x' into resetable 2018-11-04 17:43:01 +01:00
Jordi Boggiano
6ab058099c Merge branch '1.x' 2018-11-04 17:18:09 +01:00
Nicolas Grekas
db8130ce83 Add ProcessorInterface, an optional one to allow labelling Monolog processors 2018-10-12 12:14:11 -07: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
85792c8818 Make use of random_bytes for better uniqueness 2016-09-25 21:23:55 +02:00
Jordi Boggiano
6e6586257d Add scalar types to processor/formatters and top level classes 2016-09-25 21:23:35 +02:00
Jordi Boggiano
21dde4dedb Move to strict mode and fix tests 2016-05-27 13:44:00 +01:00
Jared Markell
3a3d28f91a Add getUid() to UidProcessor 2015-08-24 14:50:30 -07:00
Jordi Boggiano
3f8c37b23c CS fixer 2013-03-28 11:41:04 +01:00
Jordi Boggiano
041aa3930f Add length arg to the UidProcessor, refs #169 2013-02-26 11:18:11 +01:00
Simon Mönch
340c85b8cc Bugfix 2013-02-26 10:48:50 +01:00
Simon Mönch
9cf31da70d Better naming 2013-02-26 10:19:42 +01:00