lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

Unable to configure the logger to use a custom handler. #497

Closed mopperHaarlem closed 1 year ago

mopperHaarlem commented 1 year ago

Unable to configure the logger to use a custom handler.

If I configure with: 'jiraLogEnabled=false' and am using the bundel in Symfony, I get the following exception:

Compile Error: Declaration of JiraRestApi\NoOperationMonologHandler::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void

It would be great, to customize the LogHandler by DI , so you can use your own class?

$this->log->pushHandler(new NoOperationMonologHandler());

mopperHaarlem commented 1 year ago

I should have paid more attention to the constructor