Till Westmann has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/1767
Change subject: Move to java.util.logging as that is configured
......................................................................
Move to java.util.logging as that is configured
Change-Id: Ib4f751e65787d24ec017b70e12715b059f98c3d2
---
M
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/67/1767/1
diff --git
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
index 1ea512a..e782f17 100644
---
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
+++
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
@@ -40,6 +40,8 @@
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Predicate;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import java.util.stream.Stream;
import javax.xml.bind.JAXBContext;
@@ -65,8 +67,6 @@
import org.apache.hyracks.control.common.config.ConfigManager;
import org.apache.hyracks.control.common.controllers.ControllerConfig;
import org.apache.hyracks.control.common.controllers.NCConfig;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
public class PropertiesAccessor implements IApplicationConfig {
private static final Logger LOGGER =
Logger.getLogger(PropertiesAccessor.class.getName());
@@ -159,7 +159,7 @@
option = optionTemp;
}
if (option == null) {
- LOGGER.warn("Ignoring unknown property: " + p.getName());
+ LOGGER.warning("Ignoring unknown property: " +
p.getName());
} else {
configManager.set(option,
option.type().parse(p.getValue()));
}
@@ -197,8 +197,8 @@
try (FileInputStream is = new FileInputStream(fileName)) {
return configure(is, fileName);
} catch (FileNotFoundException fnf1) {
- LOGGER.warn("Failed to get configuration file " + fileName + " as
FileInputStream. FileNotFoundException");
- LOGGER.warn("Attempting to get default configuration file " +
GlobalConfig.DEFAULT_CONFIG_FILE_NAME
+ LOGGER.warning("Failed to get configuration file " + fileName + "
as FileInputStream. FileNotFoundException");
+ LOGGER.warning("Attempting to get default configuration file " +
GlobalConfig.DEFAULT_CONFIG_FILE_NAME
+ " as FileInputStream");
try (FileInputStream fis = new
FileInputStream(GlobalConfig.DEFAULT_CONFIG_FILE_NAME)) {
return configure(fis, GlobalConfig.DEFAULT_CONFIG_FILE_NAME);
@@ -300,8 +300,8 @@
try {
return value == null ? defaultValue : interpreter.parse(value);
} catch (IllegalArgumentException e) {
- if (LOGGER.isEnabledFor(Level.ERROR)) {
- LOGGER.error("Invalid property value '" + value + "' for
property '" + property + "'.\n" +
+ if (LOGGER.isLoggable(Level.SEVERE)) {
+ LOGGER.severe("Invalid property value '" + value + "' for
property '" + property + "'.\n" +
"Default = " + defaultValue);
}
throw e;
--
To view, visit https://asterix-gerrit.ics.uci.edu/1767
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4f751e65787d24ec017b70e12715b059f98c3d2
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <[email protected]>