Add --debug-json switch and log level.

The JSON structures should not be printed by default to debug log.

This flag introduces new debug level that prints JSON structures
and keeps default debug output separate.
This commit is contained in:
Milan Broz
2019-01-10 14:52:49 +01:00
parent cf31bdb65c
commit 51dd2762a9
10 changed files with 19 additions and 10 deletions

View File

@@ -263,7 +263,7 @@ void global_log_callback(int level, const char *msg, void *usrptr)
fprintf(stdout, "%s", msg);
}
if (level == CRYPT_LOG_DEBUG)
if (level <= CRYPT_LOG_DEBUG)
return;
strncat(global_log, msg, sizeof(global_log) - strlen(global_log));