Added more logging

This commit is contained in:
Emad-salah 2019-12-10 02:10:15 +01:00 committed by GitHub
parent 0e244af525
commit e3a1a1f454

View file

@ -404,10 +404,10 @@ module.exports = (
success: false
});
}
logger.debug("initWallet:", initWalletResponse);
logger.info("initWallet:", initWalletResponse);
const waitUntilFileExists = seconds => {
logger.debug(
logger.info(
`Waiting for admin.macaroon to be created. Seconds passed: ${seconds}`
);
setTimeout(async () => {
@ -419,9 +419,8 @@ module.exports = (
return waitUntilFileExists(seconds + 1);
}
logger.debug("admin.macaroon file created");
logger.info("admin.macaroon file created");
mySocketsEvents.emit("updateLightning");
await LightningServices.init();
const token = await auth.generateToken();
@ -434,6 +433,7 @@ module.exports = (
}
});
} catch (err) {
console.error(err);
res.status(400).json({
field: "unknown",
errorMessage: sanitizeLNDError(err.message)