From 846aa141c8393ccb74e65c0160eff36620955ef9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 6 Jun 2024 15:50:49 +0100 Subject: Support controlling adding timestamps to the log output So this can be turned off when the shepherd is adding the timestamps. --- scripts/guix-build-coordinator-agent.in | 11 +++++++++-- scripts/guix-build-coordinator.in | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/guix-build-coordinator-agent.in b/scripts/guix-build-coordinator-agent.in index 2f9e774..69ecf8a 100644 --- a/scripts/guix-build-coordinator-agent.in +++ b/scripts/guix-build-coordinator-agent.in @@ -126,6 +126,11 @@ (lambda (opt name arg result) (alist-cons 'metrics-file arg + result))) + (option '("timestamp-log-output") #t #f + (lambda (opt name arg result) + (alist-cons 'timestamp-log-output? + (string=? arg "true") result))))) (define %option-defaults @@ -140,7 +145,8 @@ (* 3 (/ (total-processor-count) 4))) 1)) (dynamic-auth-token - . ,(getenv "GUIX_BUILD_COORDINATOR_DYNAMIC_AUTH_TOKEN")))) + . ,(getenv "GUIX_BUILD_COORDINATOR_DYNAMIC_AUTH_TOKEN")) + (timestamp-log-output? . #t))) (define (parse-options options defaults args) (args-fold @@ -207,4 +213,5 @@ (or (assq-ref opts 'non-derivation-substitute-urls) (assq-ref opts 'substitute-urls)) (assq-ref opts 'metrics-file) - (assq-ref opts 'max-1min-load-average))))) + (assq-ref opts 'max-1min-load-average) + (assq-ref opts 'timestamp-log-output?))))) diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in index ad900c8..9246bbf 100644 --- a/scripts/guix-build-coordinator.in +++ b/scripts/guix-build-coordinator.in @@ -414,7 +414,12 @@ "error: ~A is not a known allocation strategy\n" arg) (exit 1))) - result)))) + result))) + (option '("timestamp-log-output") #t #f + (lambda (opt name arg result) + (alist-cons 'timestamp-log-output? + (string=? arg "true") + result)))) (append-map (lambda (hook) (list @@ -1085,7 +1090,9 @@ tags: #:database-uri-string (assq-ref opts 'database) #:hooks hooks-with-defaults #:allocation-strategy - (assq-ref opts 'allocation-strategy)))) + (assq-ref opts 'allocation-strategy) + #:timestamp-log-output? + (assq-ref opts 'timestamp-log-output?)))) (parameterize ((%show-error-details (assoc-ref opts 'show-error-details))) -- cgit v1.2.3