rust-vmm / vhost-user-backend

Deprecated repository, code now lives in: https://github.com/rust-vmm/vhost/
Apache License 2.0
18 stars 16 forks source link

Should there be away to enable logging? #4

Open stsquad opened 3 years ago

stsquad commented 3 years ago

I guess this might be a wider policy question but when implementing a new daemon should we have a way to enable logging in the backend crate. At the moment I'm stuck trying to diagnose where in the vhost-user sequence something is missing by using gdb. Perhaps we should use log! macros so debug builds can be more verbose if required?

glitzflitz commented 3 years ago

+1. I had to manually add debug! macro calls for debugging

slp commented 3 years ago

This is a question that affects all rust-vmm crates and has already popped up a couple times. We could perhaps bring this to the next rust-vmm meeting to see if we can reach an project-wide agreement about it.

andreeaflorescu commented 3 years ago

Good idea! Let's chat about it at the next rust-vmm sync. In the vmm-reference we're going to try logging with the log crate as we've been also using it in Firecracker and is turns out to be very flexible. Other log crates are built on top so it.