aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup/default.xml1
-rw-r--r--src/main/java/org/traccar/Context.java7
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);
}