Print out error properly if we can't initialize logging

Fixes #3070
This commit is contained in:
Scott Nonnenberg 2019-01-22 09:47:19 -08:00
parent f968a5db3d
commit 2c99cc8ff5
1 changed files with 4 additions and 4 deletions

View File

@ -632,13 +632,13 @@ app.on('ready', async () => {
loggingSetupError = error;
}
if (loggingSetupError) {
console.error('Problem setting up logging', loggingSetupError.stack);
}
logger = logging.getLogger();
logger.info('app ready');
if (loggingSetupError) {
logger.error('Problem setting up logging', loggingSetupError.stack);
}
if (!locale) {
const appLocale = process.env.NODE_ENV === 'test' ? 'en' : app.getLocale();
locale = loadLocale({ appLocale, logger });