From fd2f021ca0655424322a8f06ee5e91ac6641d044 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 29 Dec 2020 12:28:50 -0800 Subject: Reduce number of keys --- src/main/java/org/traccar/Context.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/main/java/org/traccar') 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); } -- cgit v1.2.3