Amarjit Singh
Amarjit Singh

Reputation: 2154

PM2 save std err and std output in same file

I have a Nodejs script that I'm running using PM2 but it saves stderr and std output in separate files. But I want to know after which output message an error occured. This is only possible if PM2 doesn't separate the std error and std output.

Upvotes: 1

Views: 643

Answers (1)

salman
salman

Reputation: 314

You can use -l --log [path] with the pm2 command

pm2 start app -l --log "path to log file"

link for the more details

Upvotes: 1

Related Questions