diff options
| author | Adam Soltys <[email protected]> | 2020-03-05 13:51:13 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-03-05 13:51:13 -0800 |
| commit | 5cb36445b47b7b2c888d802088726b6bec88651a (patch) | |
| tree | 3f3921189646d7fb6d9d6a4dabe68781aa472574 /sendPayment.js | |
| parent | af5e3116eb8bec64f40ebde74d1ec8c47ef971a2 (diff) | |
| download | coinos-server-5cb36445b47b7b2c888d802088726b6bec88651a.tar.gz coinos-server-5cb36445b47b7b2c888d802088726b6bec88651a.zip | |
pino logger
Diffstat (limited to 'sendPayment.js')
| -rw-r--r-- | sendPayment.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sendPayment.js b/sendPayment.js index 497a93ec..ad92ef52 100644 --- a/sendPayment.js +++ b/sendPayment.js @@ -1,7 +1,7 @@ const bolt11 = require("bolt11"); const config = require("./config"); -const l = console.log; +const l = require("pino")(); module.exports = (app, db, emit, seen, lna, lnb) => async (req, res) => { let hash = req.body.payreq; @@ -9,7 +9,7 @@ module.exports = (app, db, emit, seen, lna, lnb) => async (req, res) => { let { route } = req.body; let { user } = req; - l("sending lightning", user.username, payreq.satoshis); + l.info("sending lightning", user.username, payreq.satoshis); if (seen.includes(hash)) { return res.status(500).send("Invoice has been paid, can't pay again"); @@ -89,7 +89,7 @@ module.exports = (app, db, emit, seen, lna, lnb) => async (req, res) => { }); }); } catch (e) { - l(e); + l.info(e); return res.status(500).send(e); } }; |
