On Mon, Mar 26, 2018 at 10:16:54 +0200, Michal Privoznik wrote: > On 03/26/2018 09:49 AM, Peter Krempa wrote: > > On Mon, Mar 26, 2018 at 07:16:42 +0200, Michal Privoznik wrote: > >> Unless overridden, libdevmapper logs all messages to stderr. > >> Therefore if something goes wrong in storage_backend_mpath.c or > >> parthelper.c we don't honour user set logging targets. > >> > >> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > >> --- > >> src/util/virlog.c | 23 +++++++++++++++++++++++ > >> 1 file changed, 23 insertions(+) > > > > I think this should be done in the function which registers the mpath > > storage backend. For now it should work as is, but given that we are > > going to split the daemons this code will not really be necessary in > > other places. > > > > And it really does not have to do much with our logging code. > > > > Well, in the next patch I'm introducing virFileGetMPathTargets() which > uses dm_* a lot. Now, since the function lives in src/util/ it can be > used by many drivers. Do we expect each one of them to provide dummy > callback on their own? I don't think so. I agree this is not a nice > patch, but I don't really see any better place for it. I've written another response to my original reply which explains a bit more. Basically, the code in the next patch should be put in a new file along with a virOnce function to silence the logs if you don't want to move it into the storage driver directly.
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list