1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-26 10:06:10 +01:00
Commit Graph

138 Commits

Author SHA1 Message Date
Jordi Boggiano
8b5278d8e1 Bump phpstan to level 8 2021-07-04 14:08:43 +02:00
Jordi Boggiano
4ef5da80ad Fix CS 2021-07-04 14:04:52 +02:00
Jordi Boggiano
13d40f953f More type fixes towards level 7 2021-07-04 14:04:52 +02:00
Jordi Boggiano
01d104aa78 Add Record/Level/LevelName type aliases and improve phpstan type coverage to level 6 2021-07-04 14:04:52 +02:00
Jordi Boggiano
4b4b17256b Merge branch '1.x' into main 2020-12-10 12:09:26 +01:00
Jordi Boggiano
e6e43ca097 Use Utils::jsonEncode to encode json correctly 2020-12-10 09:57:10 +01:00
Dino Korah
fa78dd4400 Backport PsrLogMessageProcessor from master (2.x) 2020-08-04 12:09:20 +01:00
Jordi Boggiano
84342aa0a3 Merge branch '1.x' 2020-07-08 21:27:58 +02:00
Jordi Boggiano
c3a05db90c Fix unique_id in WebProcessor not being disableable, fixes #1470 2020-07-08 21:01:20 +02:00
Jordi Boggiano
ded9976021 Merge branch '1.x' 2020-05-11 21:43:55 +02:00
Henrique Serrat
280f6a131f Check that is not null before calling preg_match 2020-03-13 11:25:08 -03:00
Jordi Boggiano
a81f62df48 Merge pull request #1316 from keksa/feature/fix-processor-interface
fix ProcessorInterface
2019-07-02 16:13:21 +02:00
Ondrej Exner
c5cacaa121 fix ProcessorInterface 2019-04-17 16:06:03 +02:00
The Digital Orchard
0b76b0b36a avoid function call when not needed; use single variable instead of two 2019-01-25 17:44:25 -08:00
George Mponos
c99682466f Fix docblocks 2018-12-10 21:07:13 +02:00
George Mponos
208381d43e added more docblock fixes 2018-12-09 22:48:48 +02:00
George Mponos
790ff7fd1d Docblock fixes 2018-12-09 22:31:46 +02:00
George Mponos
73f2639237 Docblock fixes 2018-12-09 21:46:17 +02:00
Jordi Boggiano
0ad73a526f CS fixes 2018-12-08 18:16:32 +01:00
Jordi Boggiano
a7984a640f Merge remote-tracking branch 'gmponos/add_visibility_to_constants' 2018-11-29 19:41:58 +01:00
Jordi Boggiano
4a33226f25 Wrap up type-hint adding to all handlers 2018-11-19 23:28:33 +01:00
George Mponos
c68b71edeb Add visibility to constants 2018-11-17 20:38:51 +02:00
Jordi Boggiano
073c5d763a Merge branch '1.x' 2018-11-04 18:40:32 +01:00
Jordi Boggiano
42d84e6a8d Move getClass method to a Utils class, refs #1190 2018-11-04 18:23:20 +01:00
Jordi Boggiano
ca3813e31f Merge remote-tracking branch 'nicolas-grekas/anon' into 1.x 2018-11-04 18:00:46 +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
Nicolas Grekas
9117a6c747 Fix displaying anonymous classes 2018-09-24 20:18:56 +02: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
41b8f5ebf4 CS fixes 2018-06-18 18:53:46 +02:00
Jordi Boggiano
bbf9de5c8d Follow useMicroseconds flag when possible 2018-06-18 16:48:08 +02:00
Lars Strojny
85d49f8568 Better PSR-3 message formatting 2018-06-18 12:24:31 +02:00
Jordi Boggiano
d353a88337 Merge pull request #1046 from grongor/psr-processor-add-option
PsrLogMessageProcessor: add option to remove used context fields
2018-06-09 17:24:13 +02:00
Luke Waite
3507f48edb Remove conditional php version check for debug_backtrace legacy support (#1134) 2018-06-07 19:22:49 +02:00
Jordi Boggiano
8c4539f1fe More boolean=>bool 2018-06-07 18:45:07 +02:00
Jakub Chábek
009d4151b4 PsrLogMessageProcessor: add option to remove used context fields 2017-08-21 09:55:09 +02:00
mahone3297
889b25a72b [feature] add host processor 2017-08-17 17:38:25 +08:00
Jordi Boggiano
1417e2d183 Merge branch '1.x' 2017-06-19 02:16:33 +02:00
Brant Messenger
1b769912d1 PHP Versions less than 5.3.6 throws undefined constant DEBUG_BACKTRAC… (#986)
* PHP Versions less than 5.3.6 throws undefined constant DEBUG_BACKTRACE_IGNORE_ARGS 

Notice: Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in /vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php on line 58

* Define DEBUG_BACKTRACE_IGNORE_ARGS if not defined.

* Solution using PHP_VERSION_ID and not defining...

...DEBUG_BACKTRACE_IGNORE_ARGS
2017-06-19 01:16:17 +02:00
Lesnykh Ilia
e5ff7eb074 Use coalesce operator (#982)
* Use coalesce operator

* Use coalesce operator

* Use coalesce operator

* Use coalesce operator
2017-05-08 11:13:42 +02:00
Jordi Boggiano
7405bb5d67 CS fixes 2017-03-20 10:56:47 +01:00
Piers Warmers
a0406bf8dd Handle DateTime objects in formatted messages (#940)
* Handle DateTime objects in formatted meessages

* Use interface to catch both DateTime and DateTimeImmutable

* Maintain formatting standards.

* Visibility to private.
2017-03-14 08:07:57 +01:00
Jordi Boggiano
75c37161d5 Merge branch '1.x' 2016-09-29 09:18:55 +02:00
Jordi Boggiano
6bf91fa40a Make sure MercurialProcessor fails gracefully 2016-09-29 09:17:31 +02:00
Jordi Boggiano
5ce1c921ad Fix type errors, thanks phan 2016-09-25 22:11:37 +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
96f4fd718f CS fixes 2016-09-25 17:46:38 +02:00