private static function getConfigurator($configurator = null) {
		if ($configurator === null) {
			return new \n2n\log4php\configurator\ConfiguratorDefault();
		}
		
		if (is_object($configurator)) {
			if ($configurator instanceof \n2n\log4php\LoggerConfigurator) {
				return $configurator;
			} else {
				throw new \n2n\log4php\LoggerException("log4php: Given configurator object [$configurator] does not implement the \n2n\log4php\LoggerConfigurator interface. Reverting to default configurator.", E_USER_WARNING);
				return new \n2n\log4php\configurator\ConfiguratorDefault();
			}
		}
		
		if (is_string($configurator)) {
			if (!class_exists($configurator)) {
				throw new \n2n\log4php\LoggerException("log4php: Specified configurator class [$configurator] does not exist. Reverting to default configurator.", E_USER_WARNING);
				return new \n2n\log4php\configurator\ConfiguratorDefault();
			}
			
			$instance = new $configurator();
				
			if (!($instance instanceof \n2n\log4php\LoggerConfigurator)) {
				throw new \n2n\log4php\LoggerException("log4php: Specified configurator class [$configurator] does not implement the \n2n\log4php\LoggerConfigurator interface. Reverting to default configurator.", E_USER_WARNING);
				return new \n2n\log4php\configurator\ConfiguratorDefault();
			}
			
			return $instance;
		}
		
		throw new \n2n\log4php\LoggerException("log4php: Invalid configurator specified. Expected either a string or a \\n2n\\log4php\\LoggerConfigurator instance. Reverting to default configurator.", E_USER_WARNING);
		return new \n2n\log4php\configurator\ConfiguratorDefault();
	}