1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
=head1 NAME
nbdkit_debug, nbdkit_vdebug - print debugging messages for nbdkit
=head1 SYNOPSIS
#include <nbdkit-plugin.h>
void nbdkit_debug (const char *fs, ...);
void nbdkit_vdebug (const char *fs, va_list args);
=head1 DESCRIPTION
Use C<nbdkit_debug> or C<nbdkit_vdebug> to print debug messages from
your plugin or filter.
These functions send the debug message to stderr. Debug messages are
only emitted when the server is in verbose mode (nbdkit I<-v> option)
C<nbdkit_debug> works like L<printf(3)>. C<nbdkit_vdebug> works like
L<vprintf(3)>.
For convenience both these functions preserve the value of C<errno>,
and also support the glibc extension of a single C<%m> in a format
string expanding to C<strerror(errno)>, even on platforms that don't
support that natively.
=head1 LANGUAGE BINDINGS
In L<nbdkit-golang-plugin(3)>:
import "libguestfs.org/nbdkit"
nbdkit.Debug(msg)
In L<nbdkit-ocaml-plugin(3)>:
NBDKit.debug : ('a, unit, string, unit) format4 -> 'a
In L<nbdkit-perl-plugin(3)>:
Nbdkit::debug ($msg);
In L<nbdkit-python-plugin(3)>:
import nbdkit
nbdkit.debug(str)
In L<nbdkit-rust-plugin(3)>:
use nbdkit::*;
debug!(fs, ...);
=head1 HISTORY
C<nbdkit_debug> was present in nbdkit 0.1.0.
=head1 SEE ALSO
L<nbdkit(1)>,
L<nbdkit_error(3)>,
L<nbdkit-plugin(3)>,
L<nbdkit-filter(3)>.
=head1 AUTHORS
Richard W.M. Jones
=head1 COPYRIGHT
Copyright Red Hat
|