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

12 Commits

Author SHA1 Message Date
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
7567cecfa5 Optimize ChromePHP/FirePHP to skip header generation when they are disabled, refs #360 2014-04-23 15:56:51 +02:00
Jordi Boggiano
da33c84d07 CS fixes 2012-06-14 15:47:01 +02:00
Kirill chEbba Chebunin
505f9b3481 Make FirePHPHandlerTest independent from WildfireFormatter 2011-08-03 00:11:08 +04:00
Jordi Boggiano
8108272c6c Added @covers annotations to everything 2011-06-29 20:23:08 +02:00
Christophe Coevoet
e9f3e0c2d7 Moved the channel as label on the FirePHP message for a better formatting 2011-06-01 00:43:09 +02:00
Christophe Coevoet
c1675c59d8 Added the support of a logging context 2011-06-01 00:10:38 +02:00
Jordi Boggiano
1defa7857f Fixed plugin protocol uri for FirePHPHandler, closes #25 2011-05-16 22:50:16 +02:00
Jordi Boggiano
2b1c68e0d0 Make $initialized static
Removed custom writer, overriding is easy enough
CS fixes
Added TestFirePHPHandler class to enable testing of headers
2011-04-25 15:48:52 +02:00
Eric Clemmons
275084d5d7 Refactored header creation to use $key => $value pairs for easier support for 3rd-party Response objects 2011-04-23 17:52:32 -07:00
Eric Clemmons
12ab07447d Refactored FirePHPHandler a bit to support Closures & Methods to override how headers are sent.
(Defaults to PHP's `header` function)
2011-04-23 15:33:39 -07:00
Eric Clemmons
f158104762 Added tests for WildfireFormatter & FirePHPHandler 2011-04-22 14:12:12 -07:00