Skip to content

Commit

Permalink
Merge pull request kubevirt#4554 from andreabolognani/libvirtd-logging
Browse files Browse the repository at this point in the history
virt-launcher: Improve libvirtd debug log filters
  • Loading branch information
kubevirt-bot authored Nov 23, 2020
2 parents c37d71a + 6d4769a commit 66b0640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/virt-launcher/virtwrap/util/libvirt_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ func SetupLibvirt() (err error) {
}

if _, ok := os.LookupEnv("LIBVIRT_DEBUG_LOGS"); ok {
// see https://wiki.libvirt.org/page/DebugLogs for details
_, err = libvirtConf.WriteString("log_filters=\"3:remote 4:event 3:util.json 3:rpc 1:*\"\n")
// see https://libvirt.org/kbase/debuglogs.html for details
_, err = libvirtConf.WriteString("log_filters=\"3:remote 4:event 3:util.json 3:util.object 3:util.dbus 3:util.netlink 3:node_device 3:rpc 3:access 1:*\"\n")
if err != nil {
return err
}
Expand Down
8 changes: 2 additions & 6 deletions tests/vmi_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,8 @@ var _ = Describe("[rfe_id:273][crit:high][vendor:[email protected]][level:compon
By("Getting virt-launcher logs")
logs := func() string { return getVirtLauncherLogs(virtClient, vmi) }

// there are plenty of strings we can use to identify the debug logs. Here we use something easy to see...
Eventually(logs,
11*time.Second,
500*time.Millisecond).
Should(ContainSubstring("OBJECT_REF"))
// ...and something we deeply care about when in debug mode.
// There are plenty of strings we can use to identify the debug logs.
// Here we use something we deeply care about when in debug mode.
Eventually(logs,
2*time.Second,
500*time.Millisecond).
Expand Down

0 comments on commit 66b0640

Please sign in to comment.