public function registerLogger(LoggerInterface $logger = null, $debug = false)
    {
        $this->logger = $logger ?: new NullLogger();
        $this->debug = $debug;

        return $this;
    }
public function registerLogger(LoggerInterface $logger = null, $debug = false)
    {
        $this->logger = $logger ?: new NullLogger();
        $this->debug = $debug;

        return $this;
    }
public function registerLogger ( LoggerInterface $ logger = null , $ debug = false ) { $ this -> logger = $ logger ? : new NullLogger ( ) ; $ this -> debug = $ debug ; return $ this ; }
register a logger and eventually debug mode into Loggable class

@param  LoggerInterface $logger
@param  boolean         $debug

@return self
register a logger and eventually debug mode into Loggable class