PHP Class Crud\Listener\ApiQueryLogListener
Very much like the DebugKit version, the SQL log will only be appended
if the following conditions is true:
1) The request must be 'api' (.json/.xml)
2) The debug level must be 2 or above
Licensed under The MIT License
For full copyright and license information, please see the LICENSE.txt
Mostrar archivo
Open project: friendsofcake/crud
Public Methods
Method |
Description |
|
beforeRender ( Cake\Event\Event $event ) : void |
Appends the query log to the JSON or XML output |
|
implementedEvents ( ) : array |
Returns a list of all events that will fire in the controller during its lifecycle. |
|
setupLogging ( Cake\Event\Event $event ) : void |
Setup logging for all connections |
|
Protected Methods
Method Details
_getQueryLogs()
protected method
Get the query logs for all sources
_getSource()
protected method
Get a specific data source
protected _getSource ( string $source ) : Cake\Datasource\ConnectionInterface |
$source |
string |
Datasource name |
return |
Cake\Datasource\ConnectionInterface |
|
_getSources()
protected method
Get a list of sources defined in database.php
beforeRender()
public method
Appends the query log to the JSON or XML output
implementedEvents()
public method
You can override this function to add you own listener callbacks
We attach at priority 10 so normal bound events can run before us
setupLogging()
public method
Setup logging for all connections