| .. | .. |
|---|
| 17 | 17 | */ |
|---|
| 18 | 18 | public class Params { |
|---|
| 19 | 19 | |
|---|
| 20 | | - private static Logger log = LogManager.getLogger(Params.class); |
|---|
| 20 | + private static final Logger LOG = LogManager.getLogger(Params.class); |
|---|
| 21 | 21 | |
|---|
| 22 | 22 | /** |
|---|
| 23 | 23 | * Key used to store config file resource location. In a web application, can be set as initial parameter in a servlet loaded on startup |
|---|
| .. | .. |
|---|
| 30 | 30 | try { |
|---|
| 31 | 31 | loadParameters(KEY_CONFIG_FILE); |
|---|
| 32 | 32 | } catch (IOException e) { |
|---|
| 33 | | - log.error("Config file {} was not found in classpath", KEY_CONFIG_FILE); |
|---|
| 33 | + LOG.error("Config file {} was not found in classpath", KEY_CONFIG_FILE); |
|---|
| 34 | 34 | System.exit(-2); |
|---|
| 35 | 35 | } |
|---|
| 36 | 36 | } |
|---|
| .. | .. |
|---|
| 44 | 44 | */ |
|---|
| 45 | 45 | public static void loadParameters(String resource) throws IOException { |
|---|
| 46 | 46 | |
|---|
| 47 | | - log.debug("Loading params from " + resource); |
|---|
| 47 | + LOG.debug("Loading params from " + resource); |
|---|
| 48 | 48 | InputStream fileis = Params.class.getResourceAsStream(resource); |
|---|
| 49 | 49 | |
|---|
| 50 | 50 | params = new Properties(); |
|---|
| 51 | 51 | try { |
|---|
| 52 | 52 | |
|---|
| 53 | 53 | params.load(fileis); |
|---|
| 54 | | - log.debug("Params loaded OK from {}", resource); |
|---|
| 54 | + LOG.debug("Params loaded OK from {}", resource); |
|---|
| 55 | 55 | } catch (IOException e) { |
|---|
| 56 | | - log.error("Error loading config file: " + e); |
|---|
| 56 | + LOG.error("Error loading config file: " + e); |
|---|
| 57 | 57 | params = null; |
|---|
| 58 | 58 | throw e; |
|---|
| 59 | 59 | } |
|---|