Using GNUNET logging rather than printf

This commit is contained in:
Fournier Nicolas 2015-06-30 14:01:06 +02:00
parent 582e623b13
commit 245adcaab2
2 changed files with 4 additions and 2 deletions

View File

@ -34,6 +34,8 @@ main (int argc, char ** argv)
struct PERF_TALER_MINTDB_Cmd test[] = struct PERF_TALER_MINTDB_Cmd test[] =
{ {
// Denomination used to create coins // Denomination used to create coins
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("00 - Start of interpretor"),
PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop", PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop",
PERF_TALER_MINTDB_NB_DENOMINATION_INIT), PERF_TALER_MINTDB_NB_DENOMINATION_INIT),
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("01 - start transaction"), PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("01 - start transaction"),
@ -104,7 +106,7 @@ main (int argc, char ** argv)
}; };
GNUNET_log_setup ("perf-taler-mintdb", GNUNET_log_setup ("perf-taler-mintdb",
"WARNING", "INFO",
NULL); NULL);
config = GNUNET_CONFIGURATION_create(); config = GNUNET_CONFIGURATION_create();
GNUNET_CONFIGURATION_load(config, "./test-mint-db-postgres.conf"); GNUNET_CONFIGURATION_load(config, "./test-mint-db-postgres.conf");

View File

@ -385,7 +385,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
return GNUNET_YES; return GNUNET_YES;
case PERF_TALER_MINTDB_CMD_DEBUG: case PERF_TALER_MINTDB_CMD_DEBUG:
printf ("%s\n", state->cmd[state->i].label); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", state->cmd[state->i].label);
break; break;
case PERF_TALER_MINTDB_CMD_LOOP: case PERF_TALER_MINTDB_CMD_LOOP: