1package org.openqa.selenium.grid.config;2import java.util.logging.Logger;3public class EnvConfig implements Config {4 private static final Logger LOG = Logger.getLogger(EnvConfig.class.getName());5 private final String prefix;6 public EnvConfig() {7 this("");8 }9 public EnvConfig(String prefix) {10 this.prefix = prefix;11 }12 public String get(String section, String name) {13 String envName = String.format("%s_%s_%s", prefix, section, name).toUpperCase();14 String value = System.getenv(envName);15 if (value != null) {16 LOG.info(String.format("Found %s = %s", envName, value));17 }18 return value;19 }20}21package org.openqa.selenium.grid.config;22import java.util.logging.Logger;23public class EnvConfig implements Config {24 private static final Logger LOG = Logger.getLogger(EnvConfig.class.getName());25 private final String prefix;26 public EnvConfig() {27 this("");28 }29 public EnvConfig(String prefix) {30 this.prefix = prefix;31 }32 public String get(String section, String name) {33 String envName = String.format("%s_%s_%s", prefix, section, name).toUpperCase();34 String value = System.getenv(envName);35 if (value != null) {36 LOG.info(String.format("Found %s = %s", envName, value));37 }38 return value;39 }40}41package org.openqa.selenium.grid.config;42import java.util.logging.Logger;43public class EnvConfig implements Config {44 private static final Logger LOG = Logger.getLogger(EnvConfig.class.getName());45 private final String prefix;46 public EnvConfig() {47 this("");48 }49 public EnvConfig(String prefix) {50 this.prefix = prefix;51 }52 public String get(String section, String name) {53 String envName = String.format("%s_%s_%s", prefix, section, name).toUpperCase();54 String value = System.getenv(envName);55 if (value != null) {56 LOG.info(String.format("Found %s = %s", envName, value));57 }58 return value;59 }60}