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 /index.js | |
| parent | af5e3116eb8bec64f40ebde74d1ec8c47ef971a2 (diff) | |
| download | coinos-server-5cb36445b47b7b2c888d802088726b6bec88651a.tar.gz coinos-server-5cb36445b47b7b2c888d802088726b6bec88651a.zip | |
pino logger
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -4,12 +4,11 @@ const cookieParser = require("cookie-parser"); const BitcoinCore = require("bitcoin-core"); const cors = require("cors"); const express = require("express"); -const morgan = require("morgan"); const config = require("./config"); const bolt11 = require("bolt11"); -const l = console.log; +const l = require("pino")(); (async () => { const bc = new BitcoinCore(config.bitcoin); @@ -20,7 +19,6 @@ const l = console.log; app.use(cookieParser()); app.use(cors({ credentials: true, origin: "http://*:*" })); app.use(compression()); - app.use(morgan("combined")); const server = require("http").Server(app); const db = require("./db"); @@ -58,7 +56,7 @@ const l = console.log; app.use(function(err, req, res, next) { res.status(500); res.send("An error occurred"); - l(err.stack); + l.info(err.stack); return res.end(); }); |
