1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-17 02:24:03 +02:00

2648 Commits

Author SHA1 Message Date
Jordi Boggiano
334b8d8783 More type hints on some handler classes 2018-07-18 09:55:49 +02:00
Kat
dc003d137e Add docblocks and return type to the FingersCrossed strategy classes. 2018-07-17 17:32:33 +01:00
Kat
10bef97dea Add scalar hints and return types to the ActivationStrategyInterface interface and its implementations. 2018-07-17 17:25:17 +01:00
Kat
b6b455ed11 Add scalar hints and return types to the SlackRecord handler. 2018-07-17 17:19:56 +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
Andrew Smith
c9d15bb808 Add fluent setters for parameters in the slack handler 2018-07-06 11:47:27 +10: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
Robert Gust-Bardon
37b587687d Move POSIX signal handling to SignalHandler*
Suggested by Helmut Hummel (@helhum).
2018-07-01 23:42:41 -05:00
Avtandil Kikabidze
4c7795d310 Rename ElasticSearch to Elasticsearch 2018-06-27 11:48:39 +04:00
Avtandil Kikabidze
34e3a48326 Update ES record type to _doc 2018-06-27 11:38:33 +04:00
Avtandil Kikabidze
3b1a8296ff Fix merging issues 2018-06-24 20:49:32 +04:00
Avtandil Kikabidze
249d1dcb5f Merge branch 'master' into feature/elasticsearch
# Conflicts:
#	composer.json
#	src/Monolog/Handler/ElasticSearchHandler.php
2018-06-24 20:43:55 +04:00
Jordi Boggiano
e5900c3814 Merge branch '1.x' 2018-06-19 09:22:38 +02:00
Jordi Boggiano
c465e11445 Clarify NewRelicHandler requirements, closes #1123 2018-06-19 09:22:34 +02:00
Jordi Boggiano
41b8f5ebf4 CS fixes 2018-06-18 18:53:46 +02:00
Jordi Boggiano
fa9c4ebf3e Update requirements in README 2018-06-18 18:27:06 +02:00
Robert Gust-Bardon
23fd84fec0 Wait for children that are being tested 2018-06-18 11:25:41 -05:00
Robert Gust-Bardon
25c427a0e4 Add a missing @dataProvider 2018-06-18 11:17:10 -05:00
Jordi Boggiano
0193a07dd7 Merge branch '1.x' 2018-06-18 17:58:26 +02:00
Jordi Boggiano
ee10777821 Fix hipchat dropping messages, fixes #1116 2018-06-18 17:58:11 +02:00
Jordi Boggiano
7346e5fe36 Merge pull request #1170 from mpdude/include_trace_for_previous
Include stacktraces for "previous" excpetions in LineFormatter
2018-06-18 17:57:31 +02:00
Matthias Pigulla
c04f66ed54 Include stacktraces for "previous" excpetions in LineFormatter 2018-06-18 17:41:09 +02:00
Jordi Boggiano
7c549e383c Update changelog 2018-06-18 17:31:08 +02:00
Jordi Boggiano
873ac681a6 Merge branch '1.x' 2018-06-18 17:27:30 +02:00
Jordi Boggiano
3e92b08956 Avoid information leaks through call_user_func arguments, fixes #1138 2018-06-18 17:21:54 +02:00
Jordi Boggiano
4e96288c15 Merge pull request #1169 from lstrojny/dev/better-psr3-formatting
Better PSR-3 message formatting
2018-06-18 16:50:07 +02:00
Jordi Boggiano
8b21ec0780 Drop PHP7.0 hacks 2018-06-18 16:49:28 +02:00
Jordi Boggiano
bbf9de5c8d Follow useMicroseconds flag when possible 2018-06-18 16:48:08 +02:00
Jordi Boggiano
57a8a172e5 Update changelog 2018-06-18 16:38:33 +02:00
Jordi Boggiano
796f56b6d3 Fix test suite 2018-06-18 15:55:01 +02:00
Jordi Boggiano
95f62f7e3c Merge branch '1.x' 2018-06-18 15:54:04 +02:00
Petter Blomberg
f753c68a73 Make context optional in hasRecord to not break backwards compatibility 2018-06-18 15:52:04 +02:00
Petter Blomberg
b381a973bc Make TestHandler::hasRecord assert context, not only message 2018-06-18 15:50:12 +02:00
Robert Gust-Bardon
ad5b8f41b0 Merge branch '1.x' into rgb/signal-handler 2018-06-18 08:18:18 -05:00
Lars Strojny
85d49f8568 Better PSR-3 message formatting 2018-06-18 12:24:31 +02:00
Jordi Boggiano
71afce5df7 Merge branch '1.x' 2018-06-18 11:34:19 +02:00
Klemen Bratec
e8db808dd3 Allow setting stream chunk size in SocketHandler (#1129) 2018-06-18 11:31:46 +02:00
Jordi Boggiano
90d343e6a6 Merge pull request #1057 from CarsonF/logstash-context-prefix
Change LogstashFormatter prefix properties to keys
2018-06-18 11:03:19 +02:00
Jordi Boggiano
fd29c89e3c Merge pull request #1080 from open-sausages/pulls/1/error-trace
ENHANCEMENT Ensure 'trace' is captured for fatal non-exceptions
2018-06-18 10:00:18 +02:00
Jordi Boggiano
ce0a2b954b Merge branch '1.x' 2018-06-17 19:04:07 +02:00
Jordi Boggiano
c99a3e98a6 Merge pull request #1146 from pauluswebster/newrelic-throwable-fix
NewRelicHandler - handle Throwable in PHP7
2018-06-17 18:54:31 +02:00
Jordi Boggiano
174a073021 Merge pull request #1115 from elwin1234/patch-1
Update RotatingFileHandler.php
2018-06-17 18:21:05 +02:00
Jordi Boggiano
5d286c1cb9 Merge pull request #1164 from gmponos/slack_formatter_constructor
Remove from slack handler on constructing the SlackRecord to pass the Formatte
2018-06-17 18:19:09 +02:00
Jordi Boggiano
3175130061 Merge branch '1.x' 2018-06-17 18:04:17 +02:00
Jordi Boggiano
00aca28c8b Fix SlackRecord normalization of fields, closes #1078 2018-06-17 18:03:59 +02:00
Jordi Boggiano
db6c4f88b3 Merge pull request #1019 from wshafer/patch-1
Update AmqpHandler Docs
2018-06-17 17:43:53 +02:00
Martin Meredith
a07a4c3741 Update Docblock to specify allowing string Log Levels (#1068) 2018-06-17 17:43:18 +02:00
Westin Shafer
010cbd650d Update docs for GelfHandler (#1020)
Updated docs to reflect the dependency of package graylog2/gelf-php in order to work
2018-06-17 17:39:20 +02:00
Jordi Boggiano
e9eff51de2 Merge branch '1.x' 2018-06-17 17:30:39 +02:00
Andrew Berry
0d993d84d1 Normalization of arrays containing self references (#1050)
Backport normalization fix from master to 1.x
2018-06-17 17:27:33 +02:00