Skip to content

Commit

Permalink
Print out error properly if we can't initialize logging
Browse files Browse the repository at this point in the history
Fixes #3070
  • Loading branch information
scottnonnenberg-signal committed Jan 29, 2019
1 parent f968a5d commit 2c99cc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.js
Expand Up @@ -632,13 +632,13 @@ app.on('ready', async () => {
loggingSetupError = error;
}

logger = logging.getLogger();
logger.info('app ready');

if (loggingSetupError) {
logger.error('Problem setting up logging', loggingSetupError.stack);
console.error('Problem setting up logging', loggingSetupError.stack);
}

logger = logging.getLogger();
logger.info('app ready');

if (!locale) {
const appLocale = process.env.NODE_ENV === 'test' ? 'en' : app.getLocale();
locale = loadLocale({ appLocale, logger });
Expand Down

0 comments on commit 2c99cc8

Please sign in to comment.