Class QueryLogger
This class is a bridge used to write LoggedQuery objects into a real log. by default this class use the built-in CakePHP Log class to accomplish this
Namespace: Cake\Database\Log
Method Summary
-
_interpolate() protected
Helper function used to replace query placeholders by the real params used to execute the query
-
_log() protected
Wrapper function for the logger object, useful for unit testing or for overriding in subclasses.
-
log() public
Writes a LoggedQuery into a log
Method Detail
_interpolate() ¶ protected
_interpolate(LoggedQuery $query): string
Helper function used to replace query placeholders by the real params used to execute the query
Parameters
-
LoggedQuery
$query The query to log
Returns
string
_log() ¶ protected
_log(LoggedQuery $query): void
Wrapper function for the logger object, useful for unit testing or for overriding in subclasses.
Parameters
-
LoggedQuery
$query to be written in log
Returns
void
log() ¶ public
log(LoggedQuery $query): void
Writes a LoggedQuery into a log
Parameters
-
LoggedQuery
$query to be written in log
Returns
void