Cannot instantiate abstract class Phalcon\Logger

Hi all , i want to log my mysql queries but i couldn do it , because when i want to use code on webiste

use Phalcon\Logger, Phalcon\Db\Adapter\Pdo\Mysql as Connection, Phalcon\Events\Manager as EventsManager, Phalcon\Logger\Adapter\File;

$di->set('db', function() {

$eventsManager = new EventsManager();

$logger = new Logger("app/logs/debug.log");

//Listen all the database events
$eventsManager->attach('db', function($event, $connection) use ($logger) {
    if ($event->getType() == 'beforeQuery') {
        $logger->log($connection->getSQLStatement(), Logger::INFO);

$connection = new Connection(array(
    "host" => "localhost",
    "username" => "root",
    "password" => "secret",
    "dbname" => "invo"

//Assign the eventsManager to the db adapter instance

return $connection;


but when i run its , i got an error like that : Fatal error: Cannot instantiate abstract class Phalcon\Logger in /clvol/webdata/ on line 192

@geass hi!

  1. Remove Phalcon\Logger;
  2. Use Phalcon\Logger\Adapter\File as FileLogger;
  3. $logger = new FileLogger("app/logs/debug.log");


So so thanks @boston :)