1

I am currently working with nodejs application. We use console.log for server side printing purpose, But here logger.log also used. Both will do the same work, but logger.log 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?

3
  • Are you using this? If not it looks like you are using another library. Can you hunt it? Commented Jul 7, 2016 at 7:42
  • 1
    logger.log isn't part of node. You're using a library. Read the documentation for that library. Commented Jul 7, 2016 at 7:45
  • Even if he's using winston or log4js, I don't see how the logger wouldn't be able to log twice in the same function. Commented Jul 7, 2016 at 7:46

1 Answer 1

4

Finally I got Answer,

Console.log

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

logger.log

logger is the customized class in my project, which enables with utiles modules for debugging modules.

if i missed anything, please point out my mistakes

Sign up to request clarification or add additional context in comments.

1 Comment

Its not a right answer. @SuperKrish logger.log is not a part of Node. May be its an object of some other class. So, Please mention, what the logger is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.