DBA-Logger fix

This commit is contained in:
Philipp Holzer 2019-04-13 20:46:58 +02:00
parent 2133decf4c
commit fbd056327a
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
5 changed files with 65 additions and 19 deletions

View file

@ -4,6 +4,7 @@ namespace Friendica\Factory;
use Friendica\Core\Config\Cache;
use Friendica\Database;
use Friendica\Util\Logger\VoidLogger;
use Friendica\Util\Profiler;
class DBFactory
@ -51,7 +52,7 @@ class DBFactory
$db_data = $server['MYSQL_DATABASE'];
}
if (Database\DBA::connect($basePath, $configCache, $profiler, $db_host, $db_user, $db_pass, $db_data, $charset)) {
if (Database\DBA::connect($basePath, $configCache, $profiler, new VoidLogger(), $db_host, $db_user, $db_pass, $db_data, $charset)) {
// Loads DB_UPDATE_VERSION constant
Database\DBStructure::definition($basePath, false);
}

View file

@ -3,6 +3,7 @@
namespace Friendica\Factory;
use Friendica\App;
use Friendica\Database\DBA;
use Friendica\Factory;
use Friendica\Util\BasePath;
use Friendica\Util\BaseURL;
@ -34,6 +35,7 @@ class DependencyFactory
// needed to call PConfig::init()
Factory\ConfigFactory::createPConfig($configCache);
$logger = Factory\LoggerFactory::create($channel, $config, $profiler);
DBA::setLogger($logger);
Factory\LoggerFactory::createDev($channel, $config, $profiler);
$baseURL = new BaseURL($config, $_SERVER);