mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Migrate to Flogger (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as safe as possible and should be easy to review and submit. No changes should be necessary to the code itself prior to submission, but small changes to BUILD files may be required. Changes within files are completely independent of each other, so this CL can be safely split up for review using tools such as Rosie. For more information, see [] Base CL: 197826149 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198560170
This commit is contained in:
parent
0d2fb3a8f0
commit
70b13596e4
178 changed files with 984 additions and 988 deletions
|
@ -15,10 +15,9 @@
|
|||
package google.registry.config;
|
||||
|
||||
import static com.google.common.base.Ascii.toLowerCase;
|
||||
import static com.google.common.logging.FormattingLogger.getLoggerForCallerClass;
|
||||
import static google.registry.util.ResourceUtils.readResourceUtf8;
|
||||
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
@ -34,7 +33,7 @@ import org.yaml.snakeyaml.Yaml;
|
|||
*/
|
||||
public final class YamlUtils {
|
||||
|
||||
private static final FormattingLogger logger = getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
private static final String ENVIRONMENT_CONFIG_FORMAT = "files/nomulus-config-%s.yaml";
|
||||
private static final String YAML_CONFIG_PROD =
|
||||
|
@ -92,9 +91,9 @@ public final class YamlUtils {
|
|||
Optional<Map<String, Object>> customMap = loadAsMap(yaml, customYaml);
|
||||
if (customMap.isPresent()) {
|
||||
yamlMap = mergeMaps(yamlMap, customMap.get());
|
||||
logger.fine("Successfully loaded environment configuration YAML file.");
|
||||
logger.atFine().log("Successfully loaded environment configuration YAML file.");
|
||||
} else {
|
||||
logger.warning("Ignoring empty environment configuration YAML file.");
|
||||
logger.atWarning().log("Ignoring empty environment configuration YAML file.");
|
||||
}
|
||||
return yaml.dump(yamlMap);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue