Merge pull request #11393 from creative-commoners/pulls/5/fix-constructor

FIX Use correct contructor for HTTPOutputHandler
This commit is contained in:
Guy Sartorelli 2024-09-24 09:35:35 +12:00 committed by GitHub
commit a81b7855de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ namespace SilverStripe\Logging;
use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\FormatterInterface;
use Monolog\Handler\AbstractProcessingHandler; use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Level;
use Monolog\LogRecord; use Monolog\LogRecord;
use SilverStripe\Control\Controller; use SilverStripe\Control\Controller;
use SilverStripe\Control\Director; use SilverStripe\Control\Director;
@ -34,9 +35,9 @@ class HTTPOutputHandler extends AbstractProcessingHandler
*/ */
private $cliFormatter = null; private $cliFormatter = null;
public function __construct() public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true)
{ {
parent::__construct(); parent::__construct($level, $bubble);
Deprecation::withSuppressedNotice(function () { Deprecation::withSuppressedNotice(function () {
Deprecation::notice( Deprecation::notice(
'5.4.0', '5.4.0',