mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Add the logger earlier in the Aphlict startup process
Summary: Add the logger as soon as possible so that the log file will contain errors if the `ws` module cannot be loaded. Test Plan: Ran `./bin/aphlict debug` without having the `ws` module installed. Saw errors in the logs. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11457
This commit is contained in:
parent
f61846b469
commit
04ee853cec
1 changed files with 5 additions and 5 deletions
|
@ -70,6 +70,11 @@ process.on('uncaughtException', function(err) {
|
||||||
set_exit_code(1);
|
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 {
|
try {
|
||||||
require('ws');
|
require('ws');
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
@ -96,11 +101,6 @@ if (ssl_config.enabled) {
|
||||||
ssl_config.cert = fs.readFileSync(config['ssl-cert']);
|
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
|
// If we're just doing a configuration test, exit here before starting any
|
||||||
// servers.
|
// servers.
|
||||||
if (config.test) {
|
if (config.test) {
|
||||||
|
|
Loading…
Reference in a new issue