diff --git a/support/aphlict/server/aphlict_server.js b/support/aphlict/server/aphlict_server.js index 692bb0d536..a567b0874f 100644 --- a/support/aphlict/server/aphlict_server.js +++ b/support/aphlict/server/aphlict_server.js @@ -70,6 +70,11 @@ process.on('uncaughtException', function(err) { set_exit_code(1); }); +// Add the logfile so we'll fail if we can't write to it. +if (config.log) { + debug.addLog(config.log); +} + try { require('ws'); } catch (ex) { @@ -96,11 +101,6 @@ if (ssl_config.enabled) { ssl_config.cert = fs.readFileSync(config['ssl-cert']); } -// Add the logfile so we'll fail if we can't write to it. -if (config.log) { - debug.addLog(config.log); -} - // If we're just doing a configuration test, exit here before starting any // servers. if (config.test) {