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
Jordi Boggiano
5ce1c921ad
Fix type errors, thanks phan
2016-09-25 22:11:37 +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
760dc44ebd
Remove redundant setTimezone call
2016-09-25 18:39:28 +02:00
Jordi Boggiano
96f4fd718f
CS fixes
2016-09-25 17:46:38 +02:00
krzysiekpiasecki
4ebf6fa43f
Declaring That a Logger Can Throw an Exception
2016-08-29 20:46:48 +02:00
Jordi Boggiano
7efec0eeab
Fix timezone param handling
2016-06-25 16:46:53 +01: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
912d813c73
Add our own DateTime implementation to provide nicer JSON output, fixes #736
2016-05-20 21:33:27 +01:00
Jordi Boggiano
e27225dc40
Switch to DateTimeImmutable everywhere
2016-05-20 20:55:31 +01:00
Jordi Boggiano
2a569ff961
Disable microsecond precision by default
2016-05-20 20:25:27 +01:00
Jordi Boggiano
a00acb6022
Clarify var purpose
2016-05-20 19:47:45 +01:00
Jordi Boggiano
f1091c3b97
CS fixes
2016-03-01 18:12:45 +00: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