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
Jordi Boggiano
ff5ae5cead
Merge branch '1.x'
2018-06-11 17:35:32 +02:00
Jordi Boggiano
120c434db9
Verify handlers types, fixes #1131
2018-06-11 17:30:42 +02:00
Jordi Boggiano
1802e5ab25
Docblock improvements, fixes #1155
2018-06-08 21:58:29 +02:00
Jordi Boggiano
12c9f58de2
Merge branch '1.x'
2018-06-08 21:08:04 +02:00
Jordi Boggiano
6d79e51f91
Tweaks to exception handler, refs #1012
2018-06-08 21:02:44 +02:00
Jordi Boggiano
4814446331
Merge remote-tracking branch 'vincepare/1.x' into 1.x
2018-06-08 20:44:28 +02:00
Jordi Boggiano
bd7b28e5ee
Merge branch '1.x'
2018-06-07 18:49:40 +02:00
Jordi Boggiano
8c4539f1fe
More boolean=>bool
2018-06-07 18:45:07 +02:00
Erik Booij
ecdfdc9897
Rename Boolean in phpDocs to bool
2017-11-04 12:14:41 +01:00
Fabrizio Castellarin
c7eb1a0f75
Remove misleading reference to RFC 5424 standard
2017-08-10 15:40:55 +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
7405bb5d67
CS fixes
2017-03-20 10:56:47 +01:00
Jordi Boggiano
d9462d50b0
Merge pull request #936 from zerkms/MICRO_OPT_FOREACH_INSTEAD_OF_CURRENT/NEXT
...
Replaced current/next-style loop with foreach
2017-03-17 23:08:00 +01:00
Jordi Boggiano
59d3df2f38
Add comment note for clarity
2017-03-17 23:07:49 +01:00
Ivan Kurnosov
c411ad174c
Changed the "rewind loop condition" operand
...
The `$handlerKey` might be a slightly more readable choice here
2017-03-13 09:06:46 +13:00
Ivan Kurnosov
f697ec7c96
Move human readable level name resolution in Logger::addRecord()
to as late as possible ( #934 )
2017-03-12 17:51:16 +01:00
Ivan Kurnosov
9e43ef06d8
Minor code readability improvement
2017-02-27 15:43:21 +13:00
Ivan Kurnosov
7f7d5e1f44
Replaced current/next-style loop with foreach
2017-02-27 15:33:55 +13: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