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

57 Commits

Author SHA1 Message Date
Jordi Boggiano
6627c092d8 Add phpstan strict rules and deprecation rules, fix all related issues 2022-04-24 11:08:10 +02:00
Jordi Boggiano
1c80bce4ad Fix error handler to not receive $context anymore as php8 dropped that 2022-04-22 21:32:10 +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
Dan Hemberger
e4bb5c5cf3 Replace switch with match (#1655)
The `match` expression is available as of PHP 8.0 and provides a more
intuitive interface than `switch` when a single value is returned.

Note that it performs an identity check (===) between the value and
case instead of a weak equality check (==).

https://www.php.net/manual/en/control-structures.match.php
2022-04-19 21:51:29 +02:00
Dan Hemberger
14f39fe0ce Use never return typehint (#1654)
The `never` return typehint was added in PHP 8.1 and can be used
to indicate that a function will never return.

RFC: https://wiki.php.net/rfc/noreturn_type
2022-04-19 21:50:32 +02:00
Koen Kivits
16cc886c02 Fix ErrorHandler::handleError $context signature (#1614)
The context can be null, eg. for internal PHP errors.
2022-03-07 14:11:30 +01: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
c5853b9b0f Improve build 2020-12-09 16:39:34 +01:00
Mponos George
a54cd1f178 Replace call_user_func 2020-07-08 23:02:57 +03:00
Thomas Perez
4e095f38f4 Fix error_handler return type declaration 2019-07-31 22:19:02 +02:00
George Mponos
ef83e0647e Fix a wrong check on Error Handler and removed an old bug 2018-12-10 22:27:29 +02:00
Jordi Boggiano
dddc7ed781 Fix some resettableinterface usages 2018-11-04 19:58:13 +01: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
Nicolas Grekas
9117a6c747 Fix displaying anonymous classes 2018-09-24 20:18:56 +02:00
Jordi Boggiano
41b8f5ebf4 CS fixes 2018-06-18 18:53:46 +02:00
Jordi Boggiano
71afce5df7 Merge branch '1.x' 2018-06-18 11:34:19 +02:00
Jordi Boggiano
7ef89ec7c6 Merge pull request #1106 from hinrik/status_500_exception
Set HTTP response code to 500 in case of exceptions
2018-06-17 16:06:06 +02:00
Jordi Boggiano
513e237375 Update docblocks some more 2018-06-08 20:27:50 +02:00
Hinrik Örn Sigurðsson
86d0984517 Set HTTP response code to 500 in case of exceptions
Resolves Seldaek/monolog#1096.
2018-01-26 14:04:19 +01:00
Damian Mooyman
2d9c905b76 ENHANCEMENT Ensure 'trace' is captured for non-exceptions
Fixes #693
2018-01-15 10:42:24 +13:00
Aerendir
9791cbcda3 Fix #1066: Use correct docblock castings. 2017-11-17 18:11:07 +01:00
Jordi Boggiano
69b21064ca Fix level map override when using setExceptionHandler, fixes #1005 2017-06-19 03:09:14 +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
4f0c07af69 Merge branch '1.x' 2017-03-12 18:18:46 +01:00
fabriceparallel
cc5f1eb34d Php5.3 autoload errors (#929)
* make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile

* Revert "make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile"

This reverts commit 8140f6026f.

* call class_exists with force autoload set to true, to force the autoload of LogLevel on registration of the handlers
2017-03-12 17:42:12 +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
cc1fe9fa91 Merge branch '1.x' 2016-07-29 05:25:24 +02:00
Adam Kiss
3419d21669 Added option to log errors regardless of error_reporting setting 2016-07-29 05:22:42 +02:00
Jordi Boggiano
0defb2665b Revert #810 and remove the context info in the php error logger of ErrorHandler, fixes #828, closes #810 2016-07-29 05:08:45 +02:00
Jordi Boggiano
b909ca1e02 Merge branch '1.x' 2016-07-02 15:03:11 +01:00
Jordi Boggiano
55841909e2 Undo accidental linebreak 2016-07-02 15:02:10 +01:00
s4msung
d9be260f3d include $context in error_handler 2016-07-02 14:43:33 +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
6d2cfa63c9 Add support for custom logging level per exception class, and set ParseError to be CRITICAL 2016-05-20 20:45:16 +01:00
Jordi Boggiano
f1091c3b97 CS fixes 2016-03-01 18:12:45 +00:00
Jordi Boggiano
906bc0e6a2 All handlers are closeable now 2015-12-18 17:48:44 +00:00
Jordi Boggiano
ce293c745a Do not assume we have a Logger in ErrorHandler, fixes #666 2015-10-14 13:47:31 +01:00
Jordi Boggiano
837f437b4c Avoid logging fatal errors twice when both error and fatal error handlers are present, fixes #622 2015-08-09 18:16:16 +01:00
Jordi Boggiano
2525053e8e Close handlers that can be closed after logging a fatal errors, refs #621 2015-08-09 17:29:54 +01:00
Jordi Boggiano
b941eac988 Improve php7 compat (Throwable is the new base type for all exceptions, so Exception is not wide enough) 2015-07-12 11:55:11 +01:00
Jordi Boggiano
6d9062594c Exit with correct code after handling an uncaught exception, fixes #592 2015-07-12 11:36:03 +01:00
Hany el-Kerdany
466057c797 Add 'code', 'message' to ErrorHandler log context.
Passed the 'code' and 'message' from the original error/fatal-error
to the context of ErrorHandler log record(s).
This will help writers of Handlers to save structured information about
errors/fatal-errors. (e.g. Useful for a "DatabaseHandler").
2014-07-25 10:36:35 +02:00
Patrick Forget
694fbb5923 updated message to include even more useful information
This was suggested by @kostiklv on github
2014-04-11 18:30:07 -04:00
Patrick Forget
4a5a150d92 When handling exception log exception message rather generic message 2014-04-10 13:29:11 -04:00
David Neilsen
b66237f825 Also prevent throwing another exception in the case that the exception logger level is not set.
Also prevent throwing another exception in the case that the exception logger level is not set.
2013-11-14 15:34:27 +13:00