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

24 Commits

Author SHA1 Message Date
Jordi Boggiano
4a33226f25 Wrap up type-hint adding to all handlers 2018-11-19 23:28:33 +01:00
Jordi Boggiano
64f6dc944a Type fixes 2018-11-04 23:31:55 +01:00
Jordi Boggiano
e07c948042 Merge branch '1.x', clean up close/reset for 2.0, refs #997 2018-11-04 22:41:52 +01:00
Jordi Boggiano
dddc7ed781 Fix some resettableinterface usages 2018-11-04 19:58:13 +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
bd7b28e5ee Merge branch '1.x' 2018-06-07 18:49:40 +02:00
Erik Booij
ecdfdc9897 Rename Boolean in phpDocs to bool 2017-11-04 12:14:41 +01:00
Jordi Boggiano
f16e67d523 CS fixes 2016-07-02 15:12:25 +01:00
Jordi Boggiano
b909ca1e02 Merge branch '1.x' 2016-07-02 15:03:11 +01:00
Jordi Boggiano
69fb2aa1c1 Fix GroupHandler::handleBatch when the handler has processors, fixes #814 2016-07-02 14:48:22 +01:00
Jordi Boggiano
21dde4dedb Move to strict mode and fix tests 2016-05-27 13:44:00 +01:00
Jordi Boggiano
ba995ffd1e Merge branch '1.x' 2016-03-01 17:15:43 +00:00
Joris Berthelot
bf82600f0c Allow GroupHandler to set a formatter to all nested handlers 2016-01-21 12:50:15 +01:00
Jordi Boggiano
6c424f851c Add a lot more scalar types and go strict in Logger 2015-12-18 17:48:48 +00:00
Jordi Boggiano
902c0c8694 Split interfaces and base/abstract classes into more sensible pieces 2015-12-18 17:48:40 +00: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
da33c84d07 CS fixes 2012-06-14 15:47:01 +02:00
Jordi Boggiano
6a2d207f98 Bubbling defaults to true 2011-06-10 16:03:47 +02:00
Christophe Coevoet
6c9946aca8 Tweaked the GroupHandler to make it handle a record only when needed 2011-05-11 23:59:45 +02:00
Christophe Coevoet
0defabb726 Refactored the AbstractHandler to avoid having some dummy write() methods 2011-05-11 18:43:04 +02:00
lenar
b6949fbf8f Rename to GroupHandler, remove callback support, add couple of tests, try 2 2011-05-10 18:07:42 +03:00
lenar
0eb5896c5b Rename to GroupHandler, remove callback support, add couple of tests 2011-05-10 18:04:41 +03:00