Markus Staab
7ca003e6ae
Rename TestCase to MonologTestCase ( #1953 )
2025-03-16 13:30:20 +01:00
Ruud Kamphuis
a258e4fe90
Deprecate DateTimeImmutable ( #1928 )
...
Fixes #1926
2024-12-05 15:38:02 +01:00
Jordi Boggiano
f43e3d5637
Upgrade phpstan, phpunit ( #1923 )
...
* Upgrade phpstan, phpunit
* Fix phpunit deprecation
* Fix hg tests
* Fix php-console tests
* Fix phpunit on 8.1
* Bump phpconsole
2024-11-11 15:21:55 +01:00
Jordi Boggiano
07cd08e0e4
Fix CS
2024-06-28 10:48:40 +02:00
Christoph Dreis
3ba77d1d39
Use fully-qualified name for native functions ( #1887 )
2024-06-28 10:45:25 +02:00
Jordi Boggiano
b127292ee0
Fix phpunit deprecations
2024-04-12 17:26:33 +02:00
Cosmin Ardeleanu
b0f4bf7eb7
Fix LogRecord "extra" data leaking between handlers ( #1819 )
...
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be >
2023-10-27 16:54:39 +02:00
chris
8561130215
Upgrade to phpunit 10 ( #1806 )
...
Co-authored-by: Christopher Georg <christopher.georg@sr-travel.de >
2023-06-20 15:56:11 +02:00
Jordi Boggiano
9b5daeaffc
Merge branch '2.x'
2023-02-06 14:46:10 +01:00
Jordi Boggiano
c8b1e0e789
Fix serialization implementation
2023-02-06 14:43:38 +01:00
Jordi Boggiano
2ae044482c
Fix serializability of Logger class, fixes #1792
2023-02-06 14:33:41 +01:00
Jordi Boggiano
c424dbc6a5
Merge branch '2.x'
2023-02-04 16:24:57 +01:00
Niklas Keller
0f014206a4
Fix cycle detection within fibers ( #1753 )
...
* Fix cycle detection within fibers
We keep a separate depth count per fiber.
Fixes #1752 .
* Avoid additional call to Fiber::getCurrent()
Suppresses phpstan errors, as they're false positives.
2023-02-04 15:49:17 +01:00
Jordi Boggiano
7d31b642bd
Merge branch '2.x'
2022-07-22 16:50:53 +02:00
Lusso Luca
ffd505543c
Add RFC 5424 level (7 to 0) support to Logger::log and Logger::addRecord, fixes #1686 ( #1723 )
...
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be >
2022-07-22 16:46:43 +02:00
Jordi Boggiano
0ddba7342f
Merge branch '2.x' into main
2022-06-09 11:04:38 +02:00
henning
24e414c993
Added $datetime parameter to addRecord method to optionally log into the past/future
2022-06-09 10:49:31 +02:00
Jordi Boggiano
b3451b008b
Merge branch '2.x' into main
2022-05-10 11:53:02 +02:00
Jordi Boggiano
a5d65f6ec4
Fix infinite loops when a log handler triggers logging itself
2022-05-10 11:10:07 +02:00
Jordi Boggiano
2695fa86cd
CI fixes
2022-04-19 22:16:53 +02:00
Jordi Boggiano
2d006a8472
Convert level/levelName to enums ( #1656 )
2022-04-19 21:49:03 +02:00
Jordi Boggiano
5eb9b8ed93
Code cleanups
2022-03-21 14:18:54 +01:00
Jordi Boggiano
400effdd45
Fix some issues, bump phpunit version
2022-03-21 14:18:54 +01:00
Victor Pryazhnikov
cdba0c5693
Deprecated setMethods() usages moving to onlyMethods()
2021-02-27 14:47:59 +03:00
Mario Blažek
d317cb97d3
Move expectException before the line where exception is thrown
2019-08-13 15:34:48 +02:00
Mario Blažek
37900f9268
Upgrade PHPUnit to v8
2019-08-12 15:20:00 +02:00
George Mponos
e855ad8923
Remove not needed checks for PHP version
2018-12-11 17:01:05 +02:00
Jordi Boggiano
0ad73a526f
CS fixes
2018-12-08 18:16:32 +01:00
Jordi Boggiano
204744df2e
Merge branch '1.x'
2018-11-30 08:44:17 +01:00
Jordi Boggiano
a335f6f1a5
Fix tests for TestHandler reset support
2018-11-30 08:43:17 +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
12c9f58de2
Merge branch '1.x'
2018-06-08 21:08:04 +02:00
Vincent Paré
207c91699e
Custom exception handler ( #500 )
...
Add custom exception handler to let the user change the default
behavior when Monolog raise an exception while logging a record.
2017-07-14 12:18:44 +02:00
Jordi Boggiano
ca4ffa68f6
Use namespaced phpunit classes, fixes #983
2017-06-19 00:48:54 +02:00
Sam-Burns
fa5d07f86f
Skipping DateTime microsecond test in PHP 7.1.3, because of https://bugs.php.net/bug.php?id=74258
2017-04-01 21:52:18 +01:00
Jordi Boggiano
8f47e12463
Fix PHP7.1 DateTime support
2016-11-17 11:25:45 +01:00
Jordi Boggiano
4a43d9b17c
Fix microseconds support on 7.1, and enable it by default as 7.1 has no perf cost anymore
2016-11-14 11:53:15 +01:00
Jordi Boggiano
5ce1c921ad
Fix type errors, thanks phan
2016-09-25 22:11:37 +02:00
Jordi Boggiano
c6a9f28e24
Fix a ton of tests for latest phpunit and turn faked-stream tests into real network tests with a local server
2016-09-19 18:20:42 +02:00
Jordi Boggiano
89683faff3
Fixes microsecond timezone support, fixes #832
2016-09-19 13:24:54 +02:00
Jordi Boggiano
21dde4dedb
Move to strict mode and fix tests
2016-05-27 13:44:00 +01:00
Jordi Boggiano
f200e79879
CS fixes
2016-05-26 20:54:06 +01:00
Jordi Boggiano
ba995ffd1e
Merge branch '1.x'
2016-03-01 17:15:43 +00:00
Jordi Boggiano
cb2778ae77
Add ->withName to clone a handler and get a new name, fixes #730
2016-02-13 16:47:31 +00: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
39f8a20e6d
Remove non-PSR-3 methods for adding log records
2015-12-18 17:48:38 +00:00
Jordi Boggiano
6505e02fd3
Change timezone to be per-instance and not global
2015-12-18 17:48:36 +00:00
Jordi Boggiano
cab3ff71ff
Add regression test for #691 and optimize implementation using a single pass loop over the handlers, refs #692
2015-11-26 23:48:42 +00:00
Jordi Boggiano
c889fb2648
CS fixes & upgrading cs fixer config
2015-11-18 17:09:46 +00:00