akc42
akc42

Reputation: 5001

PM2 logs - how do you write to them

The documentation for PM2 logs is sparse. In particular it doesn't really tell you what an application log is.

Since my logging requirements are very simple I decided not to go for one of the big logging packages.

The simple question I would like to know is - does that mean console.log? IE if my application writes to console.log will pm2 capture it and put it in a file?

Upvotes: 2

Views: 221

Answers (1)

akc42
akc42

Reputation: 5001

I found the simple way to find the answer - write a simple test script to write to console.log and see where it ends up.

And the answer was that it wrote to a file in my home directory .pm2/logs/test-out-0.log

Upvotes: 1

Related Questions