1
0
Fork 0

Move Monolog to Addons

This commit is contained in:
Philipp Holzer 2022-10-17 21:25:04 +02:00
commit 497fc4e432
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
13 changed files with 92 additions and 338 deletions

View file

@ -26,6 +26,7 @@ if (php_sapi_name() !== 'cli') {
}
use Dice\Dice;
use Friendica\DI;
use Psr\Log\LoggerInterface;
require dirname(__DIR__) . '/vendor/autoload.php';
@ -33,6 +34,8 @@ require dirname(__DIR__) . '/vendor/autoload.php';
$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]);
/// @fixme Necessary until Hooks inside the Logger can get loaded without the DI-class
DI::init($dice);
\Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
(new Friendica\Core\Console($dice, $argv))->execute();