1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-11 07:05:22 +01:00

Fix gestione log API

This commit is contained in:
Dasc3er 2021-07-28 15:17:56 +02:00
parent 19cc037b75
commit 40ba5847d1

View File

@ -144,7 +144,12 @@ foreach ($handlers as $handler) {
}
// Imposta Monolog come gestore degli errori
Monolog\ErrorHandler::register($logger, [], Monolog\Logger::ERROR, Monolog\Logger::ERROR);
$handler = new Monolog\ErrorHandler($logger);
if (!API\Response::isAPIRequest()) {
$handler->registerErrorHandler([]);
$handler->registerExceptionHandler(Monolog\Logger::ERROR);
}
$handler->registerFatalHandler(Monolog\Logger::ERROR);
// Database
$dbo = $database = database();