Task Detail
-
Activity on Wed May 23 2018 15:00:40 GMT+0000 (UTC) 1. Instead of require pino inside of server.js, I create a logger.js for it to fit modularity style. 2. In the logger.js file: 'use strict' const pino=require('pino'); let logger; module.exports=function(){ const options={prettyPrint:true, level:'trace'} logger=pino(options); return logger; } 3. Able for trace option to work, I create option object with prettyPrint:true and level:'trace' - option in Pino. 4. Insert the options into pino. 5. Inside server.js, I replace require('pino') with require('./logger.js') 6. Everything was working pretty.
10/26/2024 14:42:19 -
Activity on Wed May 23 2018 14:33:59 GMT+0000 (UTC) IMPORTANT: I might be wrong about log.trace() still work even pino is required. Pino might have take over and I might have to do a if(logger){return logger} (meaning if logger is nodejs logger then just use that) statement to have both nodejs log and pino log to work side by side.
10/26/2024 14:42:06 -
Activity on Wed May 23 2018 14:20:46 GMT+0000 (UTC) 1. Even pino is using for log, but whatever option pino don't have then logger will use node log. For example: log.trace() belong to Node and not pino, but will still work even pino is main logger because pino don't have .trace option. log.trace(): https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
10/26/2024 14:41:52 -
Activity on Wed May 23 2018 14:12:08 GMT+0000 (UTC) 1. Apply pino to my fastify server, so I don't have to require('pino')() on every page: const log=require('pino')(); const fastify=require('fastify')({logger:log}); 2. Make sure require pino before require fasitify.
10/26/2024 14:41:44 -
Activity on Wed May 23 2018 14:06:45 GMT+0000 (UTC) 1. Start simple: inside of server. js: const log=require('pino')(); and use basic log from pino npm website for now.
10/26/2024 14:41:37