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();
    }