grantnz
grantnz

Reputation: 7423

How can I view console.log/stdout or console.error/stderr output from node/express?

When running express locally, I can see console.log/console.error output in the console. When running on a server, where is this information logged?

Upvotes: 0

Views: 271

Answers (1)

grantnz
grantnz

Reputation: 7423

How is express running on your server?

If, for example, you are running it via pm2, pm2 will capture stdout and stderr and log it to a file(s). The details of where this will be logged are specific to the host process.

In the pm2 case, the logs default to ~/.pm2/logs

Upvotes: 1

Related Questions