anchor.diff:  
           cp ${elasticsearchYml} ${configDir}/elasticsearch.yml
           # Make sure the logging configuration for old elasticsearch versions is removed:
  -        rm -f ${if es5 then "${configDir}/logging.yml" else "${configDir}/log4j2.properties"}
  +        rm -f "${configDir}/logging.yml"
           cp ${loggingConfigFile} ${configDir}/${loggingConfigFilename}
  -        ${optionalString es5 "mkdir -p ${configDir}/scripts"}
  +        mkdir -p ${configDir}/scripts
           ${optionalString es6 "cp ${cfg.package}/config/jvm.options ${configDir}/jvm.options"}
   
           if [ "$(id -u)" = 0 ]; then chown -R elasticsearch:elasticsearch ${cfg.dataDir}; fi
  
positive.code:     text = esConfig;
    };
  
    loggingConfigFilename = if es5 then "log4j2.properties" else "logging.yml";
    loggingConfigFile = pkgs.writeTextFile {
      name = loggingConfigFilename;
      text = cfg.logging;
  
negative.code: 
      logging = mkOption {
        description = "Elasticsearch logging configuration.";
        default = ''
          logger.action.name = org.elasticsearch.action
          logger.action.level = info
  
          appender.console.type = Console
          appender.console.name = console
          appender.console.layout.type = PatternLayout
          appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
  
          rootLogger.level = info
          rootLogger.appenderRef.console.ref = console
        '';
        type = types.str;
      };
  
  