Pm2: 'pm2 logs' why not support multiple lists?

Created on 9 Nov 2017  Β·  2Comments  Β·  Source: Unitech/pm2

If I had three services (A, B, C)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ App name β”‚ id β”‚ mode β”‚ pid   β”‚ status β”‚ restart β”‚ uptime β”‚ cpu β”‚ mem       β”‚ user  β”‚ watching β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ A        β”‚ 0  β”‚ fork β”‚ 13904 β”‚ online β”‚ 0       β”‚ 0s     β”‚ 0%  β”‚ 10.6 MB   β”‚  bh   β”‚ enabled  β”‚
β”‚ B        β”‚ 1  β”‚ fork β”‚ 2016  β”‚ online β”‚ 0       β”‚ 0s     β”‚ 0%  β”‚ 22.5 MB   β”‚  bh   β”‚ disabled β”‚
β”‚ C        β”‚ 2  β”‚ fork β”‚ 15648 β”‚ online β”‚ 0       β”‚ 0s     β”‚ 0%  β”‚ 31.9 MB   β”‚  bh   β”‚ disabled β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I just want to see A and B, But I can't do it.

because pm2 logs command only support [id|name] or all

Why don't add pm2 logs ['A', 'B']?

Translation from Baidu
Some of the meaning may not be clearly expressed, and if it causes obstacles in reading, I'm sorry

Most helpful comment

You can do pm2 logs /[AB/] with a regex see http://pm2.keymetrics.io/docs/usage/log-management/#displaying-logs-in-real-time

i think this should say pm2 logs /[AB]/ instead.

a better (more general) example would be pm2 logs "/(AppA|AppB)/"

All 2 comments

You can do pm2 logs /[AB/] with a regex see http://pm2.keymetrics.io/docs/usage/log-management/#displaying-logs-in-real-time

You can do pm2 logs /[AB/] with a regex see http://pm2.keymetrics.io/docs/usage/log-management/#displaying-logs-in-real-time

i think this should say pm2 logs /[AB]/ instead.

a better (more general) example would be pm2 logs "/(AppA|AppB)/"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phra picture phra  Β·  3Comments

jubairsaidi picture jubairsaidi  Β·  3Comments

liujb picture liujb  Β·  3Comments

getvega picture getvega  Β·  3Comments

FujiHaruka picture FujiHaruka  Β·  3Comments