add SQL formatter
This commit is contained in:
parent
b58b674c3a
commit
8df59407d9
@ -3,7 +3,8 @@
|
||||
"description": "Returns all SQL queries in the browser.",
|
||||
"type": "library",
|
||||
"require": {
|
||||
"monolog/monolog": "^1"
|
||||
"monolog/monolog": "^1",
|
||||
"nilportugues/sql-query-formatter": "^1.2.2"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"autoload": {
|
||||
|
@ -42,10 +42,12 @@ class OxidSQLLogger implements SQLLogger
|
||||
*/
|
||||
public function startQuery($sql, array $params = null, array $types = null)
|
||||
{
|
||||
$formatter = new Formatter();
|
||||
|
||||
Monolog\Registry::sql()->addDebug(
|
||||
$this->message ? $this->message : $sql,
|
||||
[
|
||||
'query' => $sql,
|
||||
'query' => $formatter->format($sql),
|
||||
'params' => $params,
|
||||
'types' => $types,
|
||||
'logStartingFile' => $this->logStartingFile,
|
||||
|
Loading…
Reference in New Issue
Block a user