aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/Context.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index c7359e76c..9e4d4a4f4 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -137,10 +137,12 @@ public final class Context {
public static void init(String[] arguments) throws Exception {
config = new Config();
- if (arguments.length > 0) {
- config.load(arguments[0]);
+ if (arguments.length <= 0) {
+ throw new RuntimeException("Configuration file is not provided");
}
+ config.load(arguments[0]);
+
loggerEnabled = config.getBoolean("logger.enable");
if (loggerEnabled) {
Log.setupLogger(config);