Move Monolog to Addons

This commit is contained in:
Philipp 2022-10-17 21:25:04 +02:00
parent 8c084fedad
commit 497fc4e432
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
13 changed files with 92 additions and 338 deletions

View file

@ -36,6 +36,7 @@ use PDO;
use PDOException;
use PDOStatement;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
/**
* This class is for the low level database stuff that does driver specific things.
@ -80,15 +81,17 @@ class Database
/** @var ViewDefinition */
protected $viewDefinition;
public function __construct(Cache $configCache, Profiler $profiler, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition, LoggerInterface $logger)
public function __construct(Cache $configCache, Profiler $profiler, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition)
{
// We are storing these values for being able to perform a reconnect
$this->configCache = $configCache;
$this->profiler = $profiler;
$this->logger = $logger;
$this->dbaDefinition = $dbaDefinition;
$this->viewDefinition = $viewDefinition;
// Temporary NullLogger until we can fetch the logger class from the config
$this->logger = new NullLogger();
$this->connect();
}