threefoldtech / zinit

A init replacement that feels like runit written in rust+tokio
Apache License 2.0
10 stars 1 forks source link

zinit log should have an option top quit after printing the logs #49

Closed robvanmieghem closed 1 year ago

robvanmieghem commented 1 year ago

Currently zinit log seems to follow the log and I have to quit by typing Ctr-C.

muhamadazmy commented 1 year ago

It's by design actually. Also the logs are read over a Unix socket connection from zinit ring buffer directly which is always attached (filled) from active process logs. Hence there is actually no way u can tell u reached the end of the logs because there is no end.

muhamadazmy commented 1 year ago

Fixed in https://github.com/threefoldtech/zinit/releases/tag/v0.2.11

Now you can provide -s flag (for snapshot) to the zinit log command to only print a snapshot of the current logs buffer.

zinit log -s

or

zinit log -s <service-name>