1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

kbx: Use standard function to setup gcrypt logging in kbxutil.

* kbx/kbxutil.c (main): Use setup_libgcrypt_logging.
(my_gcry_logger): Remove.
This commit is contained in:
Werner Koch 2024-05-16 09:34:00 +02:00
parent 758cd4ccfc
commit 7f661aa129
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -132,28 +132,6 @@ my_strusage( int level )
}
/* Used by gcry for logging */
static void
my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
{
(void)dummy;
/* Map the log levels. */
switch (level)
{
case GCRY_LOG_CONT: level = GPGRT_LOGLVL_CONT; break;
case GCRY_LOG_INFO: level = GPGRT_LOGLVL_INFO; break;
case GCRY_LOG_WARN: level = GPGRT_LOGLVL_WARN; break;
case GCRY_LOG_ERROR:level = GPGRT_LOGLVL_ERROR; break;
case GCRY_LOG_FATAL:level = GPGRT_LOGLVL_FATAL; break;
case GCRY_LOG_BUG: level = GPGRT_LOGLVL_BUG; break;
case GCRY_LOG_DEBUG:level = GPGRT_LOGLVL_DEBUG; break;
default: level = GPGRT_LOGLVL_ERROR; break;
}
log_logv (level, fmt, arg_ptr);
}
/* static void */
/* wrong_args( const char *text ) */
@ -480,8 +458,7 @@ main (int argc, char **argv)
/* Make sure that our subsystems are ready. */
i18n_init ();
init_common_subsystems (&argc, &argv);
gcry_set_log_handler (my_gcry_logger, NULL);
setup_libgcrypt_logging ();
/*create_dotlock(NULL); register locking cleanup */