console.log and node app.js > app.log work fine most of the time.
node app.js > app.log
Sometimes, if I need to filter logs and stuff, I write them as json objects instead of plain files and create a very simple wrapper over console.log, but I've never had the need to do anything very elaborated.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.