def log_callback
      default_callback = Proc.new do |event, event_handle, buf, array|
        buf.chomp!

        if event == 64
          @log.debug "GFS: #{buf}"
        else
          @log.trace "GFS: #{buf}" unless buf.start_with?('recv_from_daemon', 'send_to_daemon')
        end
      end

      # Guestfs::EVENT_APPLIANCE  => 16
      # Guestfs::EVENT_LIBRARY    => 32
      # Guestfs::EVENT_TRACE      => 64

      # Referencing int instead of constants make it easier to test
      @guestfs.set_event_callback(default_callback, 16 | 32 | 64)

      yield if block_given?
    end
def log_callback
      default_callback = Proc.new do |event, event_handle, buf, array|
        buf.chomp!

        if event == 64
          @log.debug "GFS: #{buf}"
        else
          @log.trace "GFS: #{buf}" unless buf.start_with?('recv_from_daemon', 'send_to_daemon')
        end
      end

      # Guestfs::EVENT_APPLIANCE  => 16
      # Guestfs::EVENT_LIBRARY    => 32
      # Guestfs::EVENT_TRACE      => 64

      # Referencing int instead of constants make it easier to test
      @guestfs.set_event_callback(default_callback, 16 | 32 | 64)

      yield if block_given?
    end
https://issues.jboss.org/browse/BGBUILD-83