protected function log(string $sql, array $context = []): void
    {
        $sql = str_replace('%', '%%', $sql);
        $sql = preg_replace('/\?/', '"%s"', $sql, \count($context));

        // replace mask by data
        $log = vsprintf($sql, $context);

        Logger::info($log);
    }
protected function log(string $sql, array $context = []): void
    {
        $sql = str_replace('%', '%%', $sql);
        $sql = preg_replace('/\?/', '"%s"', $sql, \count($context));

        // replace mask by data
        $log = vsprintf($sql, $context);

        Logger::info($log);
    }
protected function log ( string $ sql , array $ context = [ ] ) : void { $ sql = str_replace ( '%' , '%%' , $ sql ) ; $ sql = preg_replace ( '/\?/' , '"%s"' , $ sql , \ count ( $ context ) ) ; // replace mask by data $ log = vsprintf ( $ sql , $ context ) ; Logger :: info ( $ log ) ; }
Log queries by Application

@param  string $sql SQL query for logs
@param  array  $context

@return void
Log queries by Application