How to use the info function from pino
Find comprehensive JavaScript pino.info code examples handpicked from public code repositorys.
5 6 7 8 9 10 11 12 13 14
const pino = require('pino')({ extreme: true }) function handle (req, res) { pino.info(req) res.end('hello world') } server.listen(3000)
26
91
3
GitHub: puzpuzpuz/cls-rtracer
15 16 17 18 19 20 21 22 23
const app = new Koa() app.use(rTracer.koaMiddleware()) app.use(async (ctx) => { logger.info('Starting request handling') const result = await fakeDbAccess() ctx.body = result })
23
296
8
+ 8 other calls in file
GitHub: jambonz/sbc-inbound
138 139 140 141 142 143 144 145 146 147
const matcher = new CIDRMatcher(cidrs); srf.connect({host: process.env.DRACHTIO_HOST, port: process.env.DRACHTIO_PORT, secret: process.env.DRACHTIO_SECRET }); srf.on('connect', (err, hp) => { if (err) return this.logger.error({err}, 'Error connecting to drachtio server'); logger.info(`connected to drachtio listening on ${hp}`); const hostports = hp.split(','); for (const hp of hostports) { const arr = /^(.*)\/(.*):(\d+)$/.exec(hp);
12
2
0
+ 16 other calls in file
GitHub: xyzuniverse/xyzbot
57 58 59 60 61 62 63 64 65 66
let dir = path.join(pluginFolder, files, filename); if (fs.existsSync(dir)) { if (dir in require.cache) { delete require.cache[dir]; if (fs.existsSync(dir)) logger.info(`re - require plugin '${filename}'`); else { logger.warn(`deleted plugin '${filename}'`); return delete global.plugins[filename]; }
0
0
0
+ 3 other calls in file
GitHub: opennomad/parrot-server
11 12 13 14 15 16 17 18 19 20 21
/* the sleep promise */ var sleep = require('sleep-promise'); /* the /health endpoint */ function health(req, res) { log.info('/health (' + req.method + ')'); return res.status(200).send('OK'); } exports.health = health;
0
0
0
+ 13 other calls in file
6 7 8 9 10 11 12 13 14 15
try { mongoClient = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true, }) logger.info('STATE: Connecting to MongoDB') await mongoClient.connect() logger.info('STATE: Successfully connected to MongoDB') return mongoClient } catch (error) {
0
0
0