diff options
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/Context.java | 7 |
1 files changed, 2 insertions, 5 deletions
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); } |