On Monday, May 23, 2016 at 4:57:29 PM UTC+2, mh-cbon wrote:
>
> Hi,
>
> I m facing a badly weird issue which i can t tell if it s a bug, or an 
> error from my side.
>
>  
It's not a bug, it's a feature :)

Seriously, *console.log* is *asynchronous*, because it can involve disk I/O 
(e.g you run a program but redirect the log to a file). In order not to 
block with such processes, console.log is made async.

IIRC *console.error* is sync - so in this particular case you can use that. 
But you can also write to process.stdout and then make sure your stuff is 
written before you end the program.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/aef2960d-f70b-405b-8255-756cdf9c2885%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to