PHP Class DebugKit\Database\Log\DebugLog

This logger decorates the existing logger if it exists, and stores log messages internally so they can be displayed or stored for future use.
Inheritance: extends Cake\Database\Log\QueryLogger
Afficher le fichier Open project: cakephp/debug_kit Class Usage Examples

Protected Properties

Свойство Type Description
$_connectionName string Name of the connection being logged.
$_logger Cake\Database\Log\LoggedQuery Decorated logger.
$_queries array Logs from the current request.
$_totalRows integer Total rows of all queries
$_totalTime integer Total time (ms) of all queries

Méthodes publiques

Méthode Description
__construct ( Cake\Database\Log\QueryLogger $logger, string $name ) Constructor
log ( Cake\Database\Log\LoggedQuery $query ) : void Log queries
name ( ) : array Get the stored logs.
queries ( ) : array Get the stored logs.
totalRows ( ) : integer Get the total rows
totalTime ( ) : integer Get the total time

Method Details

__construct() public méthode

Constructor
public __construct ( Cake\Database\Log\QueryLogger $logger, string $name )
$logger Cake\Database\Log\QueryLogger The logger to decorate and spy on.
$name string The name of the connection being logged.

log() public méthode

Log queries
public log ( Cake\Database\Log\LoggedQuery $query ) : void
$query Cake\Database\Log\LoggedQuery The query being logged.
Résultat void

name() public méthode

Get the stored logs.
public name ( ) : array
Résultat array

queries() public méthode

Get the stored logs.
public queries ( ) : array
Résultat array

totalRows() public méthode

Get the total rows
public totalRows ( ) : integer
Résultat integer

totalTime() public méthode

Get the total time
public totalTime ( ) : integer
Résultat integer

Property Details

$_connectionName protected_oe property

Name of the connection being logged.
protected string $_connectionName
Résultat string

$_logger protected_oe property

Decorated logger.
protected LoggedQuery,Cake\Database\Log $_logger
Résultat Cake\Database\Log\LoggedQuery

$_queries protected_oe property

Logs from the current request.
protected array $_queries
Résultat array

$_totalRows protected_oe property

Total rows of all queries
protected int $_totalRows
Résultat integer

$_totalTime protected_oe property

Total time (ms) of all queries
protected int $_totalTime
Résultat integer