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
3cba75ec09
Mark Logger @final to discourage extension
2022-06-19 14:12:51 +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
9c1566a971
Add a way to disable logging loop detection, closes #1681
2022-06-08 21:51:47 +02:00
Jordi Boggiano
b3451b008b
Merge branch '2.x' into main
2022-05-10 11:53:02 +02:00
Jordi Boggiano
1dacc790b9
Remove LevelName enum in favor of a Level::getName method, fixes #1667 ( #1668 )
2022-05-10 11:15:16 +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
a6a66b1178
Fix phpdoc
2022-04-24 14:11:03 +02:00
Jordi Boggiano
c312cfdabf
Restore getLevelName but deprecate it
2022-04-24 13:49:06 +02:00
Jordi Boggiano
6627c092d8
Add phpstan strict rules and deprecation rules, fix all related issues
2022-04-24 11:08:10 +02:00
Jordi Boggiano
a7de8dd0c2
Update a few more callable to Closure
2022-04-22 14:26:03 +02:00
Jordi Boggiano
0dac87975c
Add property types to all properties where possible
2022-04-21 21:58:32 +02:00
Jordi Boggiano
7952a83e0c
Move phpdoc to native types
2022-04-20 09:21:58 +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
a3ba6445a4
Cleanups
2022-03-21 14:18:56 +01:00
Jordi Boggiano
400effdd45
Fix some issues, bump phpunit version
2022-03-21 14:18:54 +01:00
Jordi Boggiano
22c8b19358
Add LogRecord class, drop PHP <8.1
2022-03-21 14:18:53 +01:00
Yurun
6f233d2e2f
Remove unused variable ( #1628 )
2022-03-13 20:31:19 +01:00
smiley
168bb6e53d
return self on several setter/builder methods for more consistent behaviour ( #1609 )
2022-03-07 14:24:20 +01:00
Jordi Boggiano
437e7a1c50
Adjust phpdoc to match the psr/log 3 interface, refs #1589
2021-09-15 13:27:21 +02:00
Jordi Boggiano
f2156cdd55
Tweak some type annotations
2021-08-17 14:13:55 +02:00
Jordi Boggiano
a6eef7298c
Last phpstan fixes
2021-07-05 13:34:03 +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
d356586239
Type hint fixes
2020-12-10 16:04:54 +01:00
Jordi Boggiano
f8c98ee2ba
Fix typo
2020-12-10 14:56:54 +01:00
Jordi Boggiano
80644c65ed
Remove unnecessary condition
2020-12-10 14:56:28 +01:00
Jordi Boggiano
df4d93f148
Simplify addRecord further by doing a single foreach over all handlers, refs #1489
2020-12-10 14:30:02 +01:00
Jordi Boggiano
c203cf84b5
Merge remote-tracking branch 'AntonAcc/speed-up-add-record' into main
2020-12-10 14:05:33 +01:00
Adrián Paníček
4813c673bd
Allow string numeric log levels
2020-10-27 11:04:07 +01:00
Anton Gorlanov
2d50668658
Speed up Logger::addRecord
2020-08-13 12:53:19 +03:00
Mponos George
a54cd1f178
Replace call_user_func
2020-07-08 23:02:57 +03:00
Mponos George
53e2c97b0b
Static analysis improvements ( #1475 )
...
* Static analysis improvements
* Fix review issues
2020-07-08 21:40:29 +02:00
Jordi Boggiano
798cbf9881
Merge branch '1.x'
2019-12-07 13:18:19 +01:00
Matthias Pigulla
f8245696b3
Use strtr() instead of strtoupper() to avoid bogus results
...
For examle the tr_TR locale will upper-case "i" to the
"latin capital letter i with dot above" İ.
2019-12-07 11:40:26 +00:00
Nicolas Grekas
a5876bed1d
Add explicity void return type to Monolog\Logger
2019-08-15 09:12:24 +02:00
Jordi Boggiano
81108d4e8a
Fix SyslogUdpHandler tests
2019-07-06 13:29:30 +02:00
George Mponos
ee26edfd8c
fix more docblocks
2018-12-10 23:38:46 +02:00
George Mponos
c68b71edeb
Add visibility to constants
2018-11-17 20:38:51 +02: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
b80352368c
Add Logger::close and clarify what close and reset do plus
2018-11-04 22:15:25 +01:00
Jordi Boggiano
073c5d763a
Merge branch '1.x'
2018-11-04 18:40:32 +01:00
Jordi Boggiano
334b8d8783
More type hints on some handler classes
2018-07-18 09:55:49 +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
96684bfb22
Merge pull request #1038 from EnoahNetzach/patch-1
...
Remove misleading reference to RFC 5424 standard
2018-06-17 16:21:33 +02:00