/*
 * Copyright 2014-present Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License. You may obtain
 * a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package com.facebook.buck.log;

import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;

import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * Utility class containing constants for logging configuration paths.
 */
public class LogConfigPaths {
  /**
   * System property holding the path to the logging.properties file in the Buck repo.
   */
  public static final String BUCK_CONFIG_FILE_PROPERTY = "buck.logging_config_file";

  /**
   * If present, the path to the logging.properties file.
   */
  public static final Optional<Path> MAIN_PATH;

  /**
   * The path to the per-project logging.properties file.
   */
  public static final Path PROJECT_PATH = Paths.get(".bucklogging.properties");

  /**
   * The path to the per-project local (git ignored) logging.properties file.
   */
  public static final Path LOCAL_PATH = Paths.get(".bucklogging.local.properties");

  /**
   * All logging properties paths.
   */
  public static final ImmutableSet<Path> ALL_PATHS;

  static {
    String buckConfigFileProperty = System.getProperty(BUCK_CONFIG_FILE_PROPERTY);
    if (buckConfigFileProperty == null) {
      MAIN_PATH = Optional.absent();
    } else {
      MAIN_PATH = Optional.of(Paths.get(buckConfigFileProperty));
    }

    ImmutableSet.Builder<Path> allPathsBuilder = ImmutableSet.builder();
    if (MAIN_PATH.isPresent()) {
      allPathsBuilder.add(MAIN_PATH.get());
    }
    allPathsBuilder.add(PROJECT_PATH, LOCAL_PATH);
    ALL_PATHS = allPathsBuilder.build();
  }

  // Utility class. Do not instantiate.
  private LogConfigPaths() { }
}

@@ -675,55 +675,8 @@
 nal;
-%0Aimport com.google.common.collect.ImmutableSet;
 %0A%0Aim
@@ -1472,108 +1472,8 @@
 );%0A%0A
-  /**%0A   * All logging properties paths.%0A   */%0A  public static final ImmutableSet%3CPath%3E ALL_PATHS;%0A%0A
   st
@@ -1729,257 +1729,8 @@
    %7D
-%0A%0A    ImmutableSet.Builder%3CPath%3E allPathsBuilder = ImmutableSet.builder();%0A    if (MAIN_PATH.isPresent()) %7B%0A      allPathsBuilder.add(MAIN_PATH.get());%0A    %7D%0A    allPathsBuilder.add(PROJECT_PATH, LOCAL_PATH);%0A    ALL_PATHS = allPathsBuilder.build();
 %0A  %7D

Remove dead code.