public function getLogger()
    {
        if ($this->logger instanceof LoggerInterface) {
            return $this->logger;
        }
        if ($this instanceof ServiceLocatorAwareInterface) {
            $logger = $this->getServiceLocator()->get(LoggerService::SERVICE_ID);
        } else {
            $logger = ServiceManager::getServiceManager()->get(LoggerService::SERVICE_ID);
        }
        return ($logger instanceof LoggerInterface) ? $logger : new NullLogger();
    }
public function getLogger()
    {
        if ($this->logger instanceof LoggerInterface) {
            return $this->logger;
        }
        if ($this instanceof ServiceLocatorAwareInterface) {
            $logger = $this->getServiceLocator()->get(LoggerService::SERVICE_ID);
        } else {
            $logger = ServiceManager::getServiceManager()->get(LoggerService::SERVICE_ID);
        }
        return ($logger instanceof LoggerInterface) ? $logger : new NullLogger();
    }
public function getLogger ( ) { if ( $ this -> logger instanceof LoggerInterface ) { return $ this -> logger ; } if ( $ this instanceof ServiceLocatorAwareInterface ) { $ logger = $ this -> getServiceLocator ( ) -> get ( LoggerService :: SERVICE_ID ) ; } else { $ logger = ServiceManager :: getServiceManager ( ) -> get ( LoggerService :: SERVICE_ID ) ; } return ( $ logger instanceof LoggerInterface ) ? $ logger : new NullLogger ( ) ; }
Get the logger based on service manager

@return \Psr\Log\LoggerInterface
Get the logger based on service manager