SuperKrish SuperKrish - 1 year ago 96
Javascript Question

Difference between console.log and logger.log in Node JS

I am currently working with nodejs application. We use

for server side printing purpose, But here
also used. Both will do the same work, but
isn't able to be used more than once in a function like below

logger.log('check level 1')
logger.log('check level 2')

anybody can help?

Answer Source

Finally I got Answer,


  • only shows the output in console, doesnot store on anywhere. It only used on runtime


  • store the output and error in a file, as well as print in console.We can control the size of logfile as wellas

if i missed anything, please point out my mistakes

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download