guix-commits
[Top][All Lists]
Advanced

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

branch master updated: Fix logging.


From: Mathieu Othacehe
Subject: branch master updated: Fix logging.
Date: Thu, 28 Jan 2021 10:18:26 -0500

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

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new 68532ae  Fix logging.
68532ae is described below

commit 68532aee908954887bfd6393009485d5bbb94ea2
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Jan 28 16:16:43 2021 +0100

    Fix logging.
    
    * src/cuirass/remote-server.scm (remote-server): Have stdout/stderr
    line-buffered.
    * src/cuirass/remote-worker.scm (remote-worker): Ditto.
    * src/cuirass/remote.scm (publish-server): Discard publish logs.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 src/cuirass/remote-server.scm | 4 ++++
 src/cuirass/remote-worker.scm | 4 ++++
 src/cuirass/remote.scm        | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/cuirass/remote-server.scm b/src/cuirass/remote-server.scm
index 5fb7633..1c59905 100644
--- a/src/cuirass/remote-server.scm
+++ b/src/cuirass/remote-server.scm
@@ -437,6 +437,10 @@ exiting."
 (define (remote-server args)
   (signal-handler)
 
+  ;; Always have stdout/stderr line-buffered.
+  (setvbuf (current-output-port) 'line)
+  (setvbuf (current-error-port) 'line)
+
   (with-error-handling
     (let* ((opts (args-fold* args %options
                              (lambda (opt name arg result)
diff --git a/src/cuirass/remote-worker.scm b/src/cuirass/remote-worker.scm
index d4ed022..f5b1e49 100644
--- a/src/cuirass/remote-worker.scm
+++ b/src/cuirass/remote-worker.scm
@@ -314,6 +314,10 @@ exiting."
 (define (remote-worker args)
   (signal-handler)
 
+  ;; Always have stdout/stderr line-buffered.
+  (setvbuf (current-output-port) 'line)
+  (setvbuf (current-error-port) 'line)
+
   (with-error-handling
     (let* ((opts (args-fold* args %options
                              (lambda (opt name arg result)
diff --git a/src/cuirass/remote.scm b/src/cuirass/remote.scm
index 32f65bb..316d6b7 100644
--- a/src/cuirass/remote.scm
+++ b/src/cuirass/remote.scm
@@ -242,7 +242,7 @@ PRIVATE-KEY to sign narinfos."
      (parameterize ((%public-key public-key)
                     (%private-key private-key))
        (with-store store
-         (let ((log-file (open-file "/tmp/publish.log" "w")))
+         (let ((log-file (open-file "/dev/null" "w")))
            (close-fdes 1)
            (close-fdes 2)
            (dup2 (fileno log-file) 1)



reply via email to

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