[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-mdb] 12/23: nicer logging
From: |
gnunet |
Subject: |
[taler-taler-mdb] 12/23: nicer logging |
Date: |
Wed, 04 Dec 2019 14:15:58 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository taler-mdb.
commit 31a0721efd1853cdb07729ed696b5b0612a8d5bc
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 4 13:05:23 2019 +0100
nicer logging
---
src/main.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/main.c b/src/main.c
index d020401..741cc62 100644
--- a/src/main.c
+++ b/src/main.c
@@ -886,7 +886,7 @@ open_nfc_reader (void *cls)
if (0 > nfc_initiator_init (pa->pnd))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to initialize NFC device: %s",
+ "Failed to initialize NFC device: %s\n",
nfc_strerror (pa->pnd));
cleanup_payment (pa);
GNUNET_assert (payment_activity == pa);
@@ -936,7 +936,7 @@ check_payment_cb (void *cls,
if (MHD_HTTP_OK != http_status)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Backend request to /check-payment failed: %u",
+ "Backend request to /check-payment failed: %u\n",
http_status);
mdb.cmd = &denyVend;
run_mdb_event_loop ();
@@ -1258,6 +1258,9 @@ write_mdb_command (void *cls)
}
if (NULL == mdb.cmd)
return;
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Sending command `%s'\n",
+ mdb.cmd.name);
mdb.tx_off = 0;
mdb.tx_len = mdb.cmd->cmd.bin_size + mdb.cmd->data.bin_size + 1;
GNUNET_assert (mdb.tx_len <= sizeof (mdb.txBuffer));
@@ -1353,14 +1356,14 @@ handle_command (const char *hex,
}
case VMC_VEND_SUCCESS:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Vend Success");
+ "Vend Success\n");
break;
case VMC_VEND_FAILURE:
{
mdb.cmd = &endSession;
mdb.session_running = GNUNET_NO;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Vend Failure");
+ "Vend Failure\n");
/* FIXME: refund logic here! */
if (NULL != payment_activity)
{
@@ -1372,7 +1375,7 @@ handle_command (const char *hex,
case VMC_VEND_SESSION_COMPLETE:
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Session Complete");
+ "Session Complete\n");
mdb.session_running = GNUNET_NO;
mdb.cmd = &endSession;
cleanup_payment (payment_activity);
@@ -1390,7 +1393,7 @@ handle_command (const char *hex,
}
case VMC_CONF:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received request for configuration");
+ "Received request for configuration\n");
mdb.cmd = &readerConfigData;
break;
case 0x14:
@@ -1414,7 +1417,7 @@ handle_command (const char *hex,
{
case 0x01:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received Reader Enable");
+ "Received Reader Enable\n");
mdb.session_running = GNUNET_NO;
break;
default:
@@ -1428,7 +1431,7 @@ handle_command (const char *hex,
}
case VMC_ACKN:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received Acknowledge (for %s)",
+ "Received Acknowledge (for %s)\n",
(NULL != mdb.last_cmd) ? mdb.last_cmd->name : "?");
if (&beginSession == mdb.last_cmd)
mdb.session_running = GNUNET_YES;
@@ -1448,7 +1451,7 @@ handle_command (const char *hex,
break;
case VMC_OOSQ:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Received Command out of Sequence (%s)",
+ "Received Command out of Sequence (%s)\n",
(NULL != mdb.last_cmd) ? mdb.last_cmd->name : "?");
mdb.session_running = GNUNET_NO;
if (mdb.last_cmd != &endSession)
@@ -1458,7 +1461,7 @@ handle_command (const char *hex,
break;
case VMC_RETR:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Received request to resend previous data (%s)",
+ "Received request to resend previous data (%s)\n",
(NULL != mdb.last_cmd) ? mdb.last_cmd->name : "?");
GNUNET_break (NULL == mdb.cmd);
GNUNET_break (NULL != mdb.last_cmd);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [taler-taler-mdb] 02/23: integration mdb first try, (continued)
- [taler-taler-mdb] 02/23: integration mdb first try, gnunet, 2019/12/04
- [taler-taler-mdb] 06/23: major mdb refactoring, gnunet, 2019/12/04
- [taler-taler-mdb] 23/23: add TODO, gnunet, 2019/12/04
- [taler-taler-mdb] 15/23: config, gnunet, 2019/12/04
- [taler-taler-mdb] 21/23: fix NPE, gnunet, 2019/12/04
- [taler-taler-mdb] 22/23: logging, gnunet, 2019/12/04
- [taler-taler-mdb] 17/23: invert checks, gnunet, 2019/12/04
- [taler-taler-mdb] 19/23: fix end session handling, gnunet, 2019/12/04
- [taler-taler-mdb] 11/23: use more named constants, gnunet, 2019/12/04
- [taler-taler-mdb] 14/23: fix FTBFS, gnunet, 2019/12/04
- [taler-taler-mdb] 12/23: nicer logging,
gnunet <=
- [taler-taler-mdb] 07/23: refactor, gnunet, 2019/12/04
- [taler-taler-mdb] 18/23: invert checks, gnunet, 2019/12/04
- [taler-taler-mdb] 20/23: add 'a' command, gnunet, 2019/12/04
- [taler-taler-mdb] 16/23: clarify input, gnunet, 2019/12/04