haeminish haeminish - 1 year ago 111
Node.js Question

What is the difference between error, stderr, stdout in node

I am using node.js and want to handle error messages.
What are the differences between erro, stderr, stdout?

When scripting shell, I redirected stderr and found useful error message and it solved the problem.

I am not clear about the concept of what kind of outputs computer have either. Can anyone explain in a comprehensive way?


Answer Source

stderr and stdout are streams. Writing to console will log both streams. Apparently the distinction exists between them so we that if we want to (for example) redirect certain data elsewhere, we have the ability to be selective.

You may find the following article helpful.


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