Skip to content

Commit

Permalink
strack trace in queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Skullbock committed Mar 4, 2020
1 parent e456837 commit 1856e0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clockwork.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="1.0.1" type="plugin" group="system" method="upgrade">
<extension version="1.1.1" type="plugin" group="system" method="upgrade">
<name>Joomla Clockwork</name>
<author>Weble Srl</author>
<creationDate>January 2018</creationDate>
<copyright>Copyright (C) 2018 Weble Srl. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.weble.it</authorUrl>
<version>1.1.0</version>
<version>1.1.1</version>
<description>PLG_CLOCKWORK_XML_DESCRIPTION</description>
<files>
<filename plugin="clockwork">clockwork.php</filename>
Expand Down
5 changes: 2 additions & 3 deletions src/JoomlaDbDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use Clockwork\Request\Request;
use Clockwork\Request\Timeline;

/**
* Data source for Eloquent (Laravel ORM), provides database queries
*/
class JoomlaDbDataSource extends DataSource
{
/**
Expand Down Expand Up @@ -145,6 +142,7 @@ public function registerQuery ($query, $time, $callStack = [])
$this->queries[] = [
'query' => (string)$query,
'time' => $time,
'trace' => $callStack,
'file' => $databaseExecuteIndex ? $callStack[$databaseExecuteIndex]['file'] : '',
'line' => $databaseExecuteIndex ? $callStack[$databaseExecuteIndex]['line'] : '',
'model' => $databaseExecuteIndex ? $callStack[$databaseExecuteIndex]['class'] : ''
Expand Down Expand Up @@ -186,6 +184,7 @@ protected function getDatabaseQueries ()
'query' => $query['query'],
'duration' => $query['time'],
'connection' => 'joomla',
'trace' => $query['trace'],
'file' => $query['file'],
'line' => $query['line'],
'model' => $query['model']
Expand Down

0 comments on commit 1856e0a

Please sign in to comment.