diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 12:28:50 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 12:28:50 -0800 |
commit | fd2f021ca0655424322a8f06ee5e91ac6641d044 (patch) | |
tree | 8232789afdebbe830cdc0e71f0cf3c6be49de1b9 | |
parent | 0519e0308c0ce6a012654b41fb331478cad81c74 (diff) | |
download | traccar-server-fd2f021ca0655424322a8f06ee5e91ac6641d044.tar.gz traccar-server-fd2f021ca0655424322a8f06ee5e91ac6641d044.tar.bz2 traccar-server-fd2f021ca0655424322a8f06ee5e91ac6641d044.zip |
Reduce number of keys
-rw-r--r-- | setup/default.xml | 1 | ||||
-rw-r--r-- | src/main/java/org/traccar/Context.java | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/setup/default.xml b/setup/default.xml index 4acfe7c22..41ac62ccc 100644 --- a/setup/default.xml +++ b/setup/default.xml @@ -17,7 +17,6 @@ <entry key='geocoder.enable'>false</entry> <entry key='geocoder.type'>google</entry> - <entry key='logger.enable'>true</entry> <entry key='logger.level'>info</entry> <entry key='logger.file'>./logs/tracker-server.log</entry> <entry key='logger.rotate'>true</entry> diff --git a/src/main/java/org/traccar/Context.java b/src/main/java/org/traccar/Context.java index 3614497af..e09504ecc 100644 --- a/src/main/java/org/traccar/Context.java +++ b/src/main/java/org/traccar/Context.java @@ -274,16 +274,13 @@ public final class Context { try { config = new Config(configFile); + Log.setupLogger(config); } catch (Exception e) { config = new Config(); Log.setupDefaultLogger(); throw e; } - if (config.getBoolean("logger.enable")) { - Log.setupLogger(config); - } - objectMapper = new ObjectMapper(); objectMapper.registerModule(new SanitizerModule()); objectMapper.registerModule(new JSR353Module()); @@ -299,7 +296,7 @@ public final class Context { dataManager = new DataManager(config); } - if (config.getBoolean("ldap.enable")) { + if (config.hasKey(Keys.LDAP_URL)) { ldapProvider = new LdapProvider(config); } |