2009-05-28 15:13:12 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\DBAL\Logging;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A SQL logger that logs to the standard output using echo/var_dump.
|
|
|
|
*
|
|
|
|
* @author Roman Borschel <roman@code-factory.org>
|
|
|
|
* @since 2.0
|
2010-03-15 20:19:00 +03:00
|
|
|
* @todo Rename: EchoSQLLogger
|
2009-05-28 15:13:12 +04:00
|
|
|
*/
|
|
|
|
class EchoSqlLogger implements SqlLogger
|
|
|
|
{
|
|
|
|
public function logSql($sql, array $params = null)
|
|
|
|
{
|
|
|
|
echo $sql . PHP_EOL;
|
|
|
|
if ($params) {
|
|
|
|
var_dump($params);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|