/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Database/Log
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Database/Log/QueryLogger.php (1754B)
$config Configuration array
*/
public function __construct(array $config = [])
{
$this->_defaultConfig['scopes'] = ['queriesLog'];
$this->_defaultConfig['connection'] = '';
parent::__construct($config);
}
/**
* @inheritDoc
*/
public function log($level, $message, array $context = [])
{
$context['scope'] = $this->scopes() ?: ['queriesLog'];
$context['connection'] = $this->getConfig('connection');
if ($context['query'] instanceof LoggedQuery) {
$context = $context['query']->getContext() + $context;
$message = 'connection={connection} duration={took} rows={numRows} ' . $message;
}
Log::write('debug', (string)$message, $context);
}
}