gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-mdb] branch master updated: more logging


From: gnunet
Subject: [taler-taler-mdb] branch master updated: more logging
Date: Mon, 05 Feb 2024 14:33:17 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository taler-mdb.

The following commit(s) were added to refs/heads/master by this push:
     new 189ae65  more logging
189ae65 is described below

commit 189ae65d60088eb612df68e5d50325a2793ec0a4
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Mon Feb 5 14:33:10 2024 +0100

    more logging
---
 src/taler-mdb.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/taler-mdb.c b/src/taler-mdb.c
index 02620d3..42022f2 100644
--- a/src/taler-mdb.c
+++ b/src/taler-mdb.c
@@ -884,6 +884,10 @@ start_command (const char *command,
                                      NULL,
                                      argv[0],
                                      argv);
+  if (NULL == ret)
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to launch %s\n",
+                argv[0]);
   for (unsigned int i = 0; i<argc; i++)
     GNUNET_free (argv[i]);
   GNUNET_array_grow (argv,
@@ -902,6 +906,8 @@ stop_advertising (void)
 {
   if (NULL == adv_child)
     return;
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Stopping advertising\n");
   GNUNET_break (0 ==
                 GNUNET_OS_process_kill (adv_child,
                                         SIGTERM));
@@ -967,14 +973,17 @@ show_error (const char *err_type)
 {
   stop_advertising ();
   hide_error (); /* just to be sure */
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Showing error `%s' using `%s'\n",
-              err_type,
-              err_process_command);
   if (NULL == err_process_command)
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Cannot show error `%s'\n",
+                err_type);
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Showing error `%s' using `%s'\n",
+              err_type,
+              err_process_command);
   err_child = start_command (err_process_command,
                              err_type,
                              NULL);
@@ -1004,6 +1013,15 @@ static void
 temporary_error (const char *err_type)
 {
   show_error (err_type);
+  if (NULL != err_stop_task)
+  {
+    GNUNET_SCHEDULER_cancel (err_stop_task);
+    err_stop_task = NULL;
+  }
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Will hide error in %s\n",
+              GNUNET_TIME_relative2s (ERR_DELAY,
+                                      true));
   err_stop_task = GNUNET_SCHEDULER_add_delayed (ERR_DELAY,
                                                 &do_hide_error,
                                                 NULL);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]