Classe: sfDebugConnection - X-Ref
Debug implementation of Connection.
This is a Connection that implements the decorator pattern, wrapping around
the true Connection object (stored in $childConnection). This Connection
tracks information about queries executed and makes that information available
for debugging purposes. The information tracked is the last query executed
on the connection (getLastExecutedQuery()) and the total number of
queries executed on the connection thus far (getNumQueriesExecuted()).
To use this debug connection, you need to register it as a new Creole
driver that handles all connection types. To do this, call the following
before calling Creole::getConnection():
<code>
Creole::registerDriver('*', 'creole.drivers.debug.DebugConnection');
</code>
The next call to Creole::getConnection() will return an instance of
DebugConnection.
setLogger($logger)
X-Ref
|
Sets a Logger class (e.g. PEAR Log) to use for logging.
The logger class must have a log() method. All messages are logged at default log level.
param: object $logger
|
log($msg)
X-Ref
|
Private function that logs message using specified logger (if provided).
param: string $msg Message to log.
|