threefoldtech / zinit

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

built-in ring buffer for services logs #13

Closed muhamadazmy closed 5 years ago

muhamadazmy commented 5 years ago

zinit now uses a built in ring buffer for services logs, the size of the buffer can be configured on init but defaults to 2000 lines of logs.

To view the services logs, in runtime run zinit log which will print all the available back log first, and then wait (follow) new logs for runtime debugging.

Other tools that needs to aggregate the logs, can directly connect to the /var/run/log.sock and read from it.

muhamadazmy commented 5 years ago

One remark though is regarding the new log sub command. It would be nice to be able to filter which services we want to get logs from.

Yes, that's a nice idea and can be easily done from client side. Will add this to the code before merging.