events: Add a warning event and direct all warning messages through it.

This also causes warnings to be printed even in non-verbose mode,
which is useful.
This commit is contained in:
Richard W.M. Jones
2013-10-11 14:35:12 +01:00
parent aada08a91c
commit 92e1864913
12 changed files with 42 additions and 22 deletions

View File

@@ -36,7 +36,7 @@ class TestLoad < Test::Unit::TestCase
# Grab log, trace and daemon messages into our custom callback.
event_bitmask = Guestfs::EVENT_APPLIANCE | Guestfs::EVENT_LIBRARY |
Guestfs::EVENT_TRACE
Guestfs::EVENT_WARNING | Guestfs::EVENT_TRACE
g.set_event_callback(log, event_bitmask)
# Make sure we see some messages.