Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
server: Allow -D nbdkit.* debug flags for the core server.
These work like plugin/filter debug flags, but apply to the internals
of the server.
  • Loading branch information
rwmjones committed Dec 12, 2019
1 parent cb910a6 commit 3b45db2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/nbdkit.pod
Expand Up @@ -177,6 +177,13 @@ Display brief command line usage information and exit.
Set the plugin or filter Debug Flag called C<FLAG> to the integer
value C<N>. See L<nbdkit-plugin(3)/Debug Flags>.

=item B<-D> nbdkit.FLAG=N

=item B<--debug> nbdkit.FLAG=N

Set the nbdkit server Debug Flag called C<FLAG> to the integer value
C<N>.

=item B<--dump-config>

Dump out the compile-time configuration values and exit.
Expand Down
2 changes: 1 addition & 1 deletion docs/synopsis.txt
@@ -1,4 +1,4 @@
nbdkit [-D|--debug PLUGIN|FILTER.FLAG=N]
nbdkit [-D|--debug PLUGIN|FILTER|nbdkit.FLAG=N]
[-e|--exportname EXPORTNAME] [--exit-with-parent]
[--filter FILTER ...] [-f|--foreground]
[-g|--group GROUP] [-i|--ipaddr IPADDR]
Expand Down
3 changes: 3 additions & 0 deletions server/main.c
Expand Up @@ -613,6 +613,9 @@ main (int argc, char *argv[])
free (t);
}

/* Apply nbdkit.* flags for the server. */
apply_debug_flags (NULL, "nbdkit");

/* Check all debug flags were used, and free them. */
free_debug_flags ();

Expand Down
2 changes: 2 additions & 0 deletions server/nbdkit.syms
Expand Up @@ -67,6 +67,8 @@
nbdkit_vdebug;
nbdkit_verror;

nbdkit_debug_*;

# Everything else is hidden.
local: *;
};

0 comments on commit 3b45db2

Please sign in to comment.