public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appConfig = $serviceLocator->get('config');
        $config = array_key_exists('log', $appConfig) ? $appConfig['log'] : array();
        $class = array_key_exists('class', $config) ? $config['class'] : 'Zend\Log\Logger';
        $logger = new $class($config);
        return $logger;
    }