gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (54d4a1ef -> dbbe1b0a)


From: gnunet
Subject: [taler-wallet-core] branch master updated (54d4a1ef -> dbbe1b0a)
Date: Wed, 01 Dec 2021 12:23:20 +0100

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

dold pushed a change to branch master
in repository wallet-core.

    from 54d4a1ef add a taler action from the history page
     new 718595a5 write logs atomically
     new dbbe1b0a fix recoup error handling

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/taler-util/src/logging.ts                  | 19 ++++++++++---------
 packages/taler-wallet-core/src/operations/recoup.ts |  4 ++--
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/packages/taler-util/src/logging.ts 
b/packages/taler-util/src/logging.ts
index 117664d8..ca7210ea 100644
--- a/packages/taler-util/src/logging.ts
+++ b/packages/taler-util/src/logging.ts
@@ -71,22 +71,23 @@ function writeNodeLog(
   args: any[],
 ): void {
   try {
-    process.stderr.write(`${new Date().toISOString()} ${tag} ${level} `);
-    process.stderr.write(`${message}`);
+    let msg = `${new Date().toISOString()} ${tag} ${level} ${message}`;
     if (args.length != 0) {
-      process.stderr.write(" ");
-      process.stderr.write(JSON.stringify(args, undefined, 2));
+      msg += ` ${JSON.stringify(args, undefined, 2)}\n`;
+    } else {
+      msg += `\n`;
     }
-    process.stderr.write("\n");
+    process.stderr.write(msg);
   } catch (e) {
     // This can happen when we're trying to log something that doesn't want to 
be
     // converted to a string.
-    process.stderr.write(`${new Date().toISOString()} (logger) FATAL `);
+    let msg = `${new Date().toISOString()} (logger) FATAL `;
     if (e instanceof Error) {
-      process.stderr.write("failed to write log: ");
-      process.stderr.write(e.message);
+      msg += `failed to write log: ${e.message}\n`;
+    } else {
+      msg += "failed to write log\n";
     }
-    process.stderr.write("\n");
+    process.stderr.write(msg);
   }
 }
 
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts 
b/packages/taler-wallet-core/src/operations/recoup.ts
index b1f46e4b..8a4c2242 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -118,8 +118,8 @@ async function putGroupAsFinished(
         recoupGroup.scheduleRefreshCoins.map((x) => ({ coinPub: x })),
         RefreshReason.Recoup,
       );
-      processRefreshGroup(ws, refreshGroupId.refreshGroupId).then((e) => {
-        console.error("error while refreshing after recoup", e);
+      processRefreshGroup(ws, refreshGroupId.refreshGroupId).catch((e) => {
+        logger.error(`error while refreshing after recoup ${e}`);
       });
     }
   }

-- 
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]