How can I see console output from app.js when it's being run with Passenger?

I was actually shocked by how easy Passenger was to set up and deploy my node + express backend.

That being said though I don’t see anyway to see any logging of what’s going on with my app. At the moment i’m just doing a CRUD demo and I don’t have much to debug, but I’m sure that’ll increase by multitudes once I jump into my business logic for this app.

So is there any way to specify a log, or is there an existing log that i’m missing somewhere?

Thank you.

Nodejs doesn’t include robust logging out-of-the-box.

For debugging you can install the debug module via npm and run the app with the DEBUG env set.

For basic access logging within Express take a look at express-logging and express-logger over at NPM.

For errors within your app you need to catch and log them programmatically. Express includes this functionality and there are other libraries available (such as winston) that might be useful.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.