diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/Context.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index e983ab99e..5a3dca878 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -145,10 +145,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); |