Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Command Line Console Log Level

How do you set the log level for node when starting it from the command line? I admit, i'm a node.js newbie, but looking for something like node myapp.js --loglevel warn

like image 863
kocodude Avatar asked Sep 22 '12 00:09

kocodude


1 Answers

Not possibly quite what you are after but you can enable debugging within node by setting a NODE_DEBUG environment variable first.

E.g. export NODE_DEBUG="net" && node myapp.js will give debugging for network related node operations.

https://github.com/joyent/node/blob/master/lib/net.js#L66

like image 193
AndyA Avatar answered Sep 28 '22 04:09

AndyA