]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Make virFileClose() quiet on success
authorAndrea Bolognani <abologna@redhat.com>
Thu, 12 Nov 2020 18:42:00 +0000 (19:42 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 16 Nov 2020 08:18:03 +0000 (09:18 +0100)
commit57515a4c36a0c7f74261df9ad6a966858def472d
tree884db5ca3754708be82e4108baa1aa0a034dc997
parent77549339838b44cd32b576e06701d1f7b4518fb5
util: Make virFileClose() quiet on success

While it's certainly good to log events like "failed to close fd"
and "tried to close invalid fd", which are likely to be the
consequence of some bug in libvirt, logging a message every single
time a file descriptor is closed successfully is perhaps excessive
and can lead to useful information being missed among the noise.

Log filters don't help in this situation, because filtering out all
of util.file is too big a hammer and would cause important messages
to be left out as well.

To give an idea of just how much noise this single debug statement
can cause, here's a real life example from a quite large libvirtd
log I had to look at recently:

  $ grep virFile libvirt.log | wc -l
  1307
  $ grep virFile libvirt.log | grep -v 'Closed fd' | wc -l
  343

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virfile.c