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:
parent
19cc037b75
commit
40ba5847d1
7
core.php
7
core.php
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user