mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
scd: New option --debug-assuan-log-cats.
* scd/scdaemon.c (oDebugAssuanLogCats): New. (opts): Add option --debug-assuan-log-cats. (main): Implement option. * common/asshelp.c (set_libassuan_log_cats): New. -- The old way of setting the logging categories with an environment variable is awkward if sdaemon is spawned from a running gpg-agent.
This commit is contained in:
parent
24e121ef26
commit
00c760f628
4 changed files with 47 additions and 19 deletions
|
@ -97,6 +97,19 @@ setup_libassuan_logging (unsigned int *debug_var_address)
|
|||
assuan_set_log_cb (my_libassuan_log_handler, debug_var_address);
|
||||
}
|
||||
|
||||
/* Change the Libassuan log categories to those given by NEWCATS.
|
||||
NEWCATS is 0 the default category of ASSUAN_LOG_CONTROL is
|
||||
selected. Note, that setup_libassuan_logging overrides the values
|
||||
given here. */
|
||||
void
|
||||
set_libassuan_log_cats (unsigned int newcats)
|
||||
{
|
||||
if (newcats)
|
||||
log_cats = newcats;
|
||||
else /* Default to log the control channel. */
|
||||
log_cats = (1 << (ASSUAN_LOG_CONTROL - 1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static gpg_error_t
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "session-env.h"
|
||||
|
||||
void setup_libassuan_logging (unsigned int *debug_var_address);
|
||||
void set_libassuan_log_cats (unsigned int newcats);
|
||||
|
||||
|
||||
gpg_error_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue