mirror of
https://github.com/friendica/friendica
synced 2025-04-24 04:30:11 +00:00
Moving from DBA to Database
This commit is contained in:
parent
5e4ace271b
commit
082634adbc
11 changed files with 1778 additions and 1211 deletions
|
@ -4,6 +4,7 @@ namespace Friendica\Factory;
|
|||
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Util\Introspection;
|
||||
use Friendica\Util\Logger\Monolog\DevelopHandler;
|
||||
|
@ -47,10 +48,11 @@ class LoggerFactory
|
|||
* @throws \Exception
|
||||
* @throws InternalServerErrorException
|
||||
*/
|
||||
public static function create($channel, Configuration $config, Profiler $profiler)
|
||||
public static function create($channel, Database $database, Configuration $config, Profiler $profiler)
|
||||
{
|
||||
if (empty($config->get('system', 'debugging', false))) {
|
||||
$logger = new VoidLogger();
|
||||
$database->setLogger($logger);
|
||||
Logger::init($logger);
|
||||
return $logger;
|
||||
}
|
||||
|
@ -101,6 +103,7 @@ class LoggerFactory
|
|||
$logger = new ProfilerLogger($logger, $profiler);
|
||||
}
|
||||
|
||||
$database->setLogger($logger);
|
||||
Logger::init($logger);
|
||||
|
||||
return $logger;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue