From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oLPiNy/4JmXQ9wAAG6o9tA:P1 (envelope-from ) for ; Wed, 11 Oct 2023 21:32:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oLPiNy/4JmXQ9wAAG6o9tA (envelope-from ) for ; Wed, 11 Oct 2023 21:32:00 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 601B5559A5 for ; Wed, 11 Oct 2023 21:31:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iR5hx728; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697052719; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3AUTox9KrvIn6wzqz9kN0Dm26ypkyUPUquVTtY6An3I=; b=XiQSgr0kavqtisDGZTXNKRd5t8Eom8tPJ1OuHJXjyZprjmA+PyRh2wk7osEHqspRq4bYej 30CJp1B7KTkbW7GI4jvxMDIy8qy3muSzTp+/ySMMpvHhZmSsbDbxlKJCOz4p168382cgqs fqdRwIIqIfHfDVYHJtG/FNfemPjEhkQb3+ePFeEuZieZoP3novaMyA78shOlt2Mw4jrKQa 1LE5qIF2zGKBkeWvYbT8PFYgiIciRNwkxaiKdXXQXSWFap14TyjtTgEhGuRpqBs9WOrinu zh6BNcU9Ws4k+gXywWalWp3pksdc5O5T71d76QLX1FHrInYFiAylrLRxtY8k4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697052719; a=rsa-sha256; cv=none; b=gto/45tWSbX6/MaeW6EKV24G1/NLIwDKxAtJ73jCJVArnx5j2gcPgtOovsq27Zl3mhhZTG FJN9ajdvBgES3gR3+RGkBqfrR0wFnih8Ke4X1X3JFuDyeVrPBlhqABSv6dYNmE0sW5q7rJ D9XUS6HtPCHYiYxwQughhaFl4l0/iBqToQfb1rwkDMaNISyE+1/LqvpRFhJPgfz70B0mYH TWhsJLu2IdVEpI7kUYCYp9vp9u8Wlq1IUHRpvvKpxEsUIMxXui/PCYJ7CCQbDI7hfpvGyS uvpKVcXkwILX0WFIk9iXtpGYTzaNs64WowfW6dg9YVFOmjfPvB+zxHmO3Ulq/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iR5hx728; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqevb-0006iJ-2S; Wed, 11 Oct 2023 15:31:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqevZ-0006iA-MJ for help-guix@gnu.org; Wed, 11 Oct 2023 15:31:29 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqevM-0005gX-ER for help-guix@gnu.org; Wed, 11 Oct 2023 15:31:21 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40651b22977so570755e9.1 for ; Wed, 11 Oct 2023 12:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697052674; x=1697657474; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3AUTox9KrvIn6wzqz9kN0Dm26ypkyUPUquVTtY6An3I=; b=iR5hx728WuxhF6aMr+dwHgTbdJpocoyxETj1mpXoP9OO/K1vtUco5pOZ+3gmvHxUAu bUGq2DJWK3aj8T8eN+hyzXFEvTZBV7qVf2VkAttbARZdq2hWbRZr4sMvnLfshqfFD+e8 n1jf3Px/85AROahVyGC89LM4MwwIYrSKfQOc42p2satkOP9HviFGS+xtQoVxSE/lv8MZ vdifgerFix37imsbWpm4xqGSId7ySmyJxzfadJpjjjJmQXEfk4K4gpkEwciuP8k+cvUj j41Zfwg0oJdjI3VU4fB5hp5EyNraJo1VfN6M/X23FE2so2q4a8L785XYZgDEAB0WqWqg DKMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697052674; x=1697657474; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3AUTox9KrvIn6wzqz9kN0Dm26ypkyUPUquVTtY6An3I=; b=ti+beeiFpe5c5aaw8MgdB3sw5KRe3qCWJBzWFmQa76gEnIuvFty7QopCRjAgoUnRlg Hr35kY6hbLAl+8Ums2Rz1zOs6lxJayXpw8Xk9CLO9ZefSqgco5s19Yvz7jf5Q8al7i04 iahEUj/STe9FGZf4IXePggMmu/h2sVA570/HaiNZi5L6L8zjgmpXiO0iQ9uJB7XbSz6Q Mu6mT3/MBxIa5ntgXIxUYMsXmdw33i233oIF8NAXN3wN+VD7Lv4FdGAfRJPER8Wifh6G uoqGqyuJcv4OF77/EvsTdCBoyfV2agsxq5X96f2QjlShzsUlsxR/8MeWk4CHR4tFvWMH kHZQ== X-Gm-Message-State: AOJu0YzDa+CfW7xRQL71u2iQ19iDg1+b1CP7VND3T7B0H5LyldEg0uXH jut54i8zswe4CRtDQkSltSeqWZKcNK0= X-Google-Smtp-Source: AGHT+IGyuLvr4JBbW77Zl2w8veIph0vL3E+23W586FgA0wdhpS7kzVGTq5VHpXN4GJQzoNV5RkMQnQ== X-Received: by 2002:a05:600c:1d18:b0:404:72f9:d59a with SMTP id l24-20020a05600c1d1800b0040472f9d59amr19840543wms.0.1697052674358; Wed, 11 Oct 2023 12:31:14 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id p15-20020a7bcc8f000000b003fee6e170f9sm17638989wma.45.2023.10.11.12.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 12:31:14 -0700 (PDT) From: Simon Tournier To: Maxim Cournoyer Cc: jgart , help-guix@gnu.org Subject: Re: -v, --verbosity=LEVEL use the given verbosity LEVEL In-Reply-To: <8734yhdwie.fsf@gmail.com> References: <21d2ab385ef16bf3404aed2cdc747fd3@dismail.de> <87bkdo29gh.fsf@gmail.com> <87bkd5tfmj.fsf@gmail.com> <8734yhdwie.fsf@gmail.com> Date: Wed, 11 Oct 2023 17:36:00 +0200 Message-ID: <87zg0prx27.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -9.51 X-Migadu-Queue-Id: 601B5559A5 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -9.51 X-TUID: VgxPeH3WZvQA Hi, On Wed, 11 Oct 2023 at 11:11, Maxim Cournoyer w= rote: >> To answer a question elsewhere in this threads, I think these levels >> come from Nix and daemon side. >> >>> See info '(guix) Invoking guix build': >>> >>> --8<---------------cut here---------------start------------->8--- >>> =E2=80=98-v LEVEL=E2=80=99 >>> =E2=80=98--verbosity=3DLEVEL=E2=80=99 >>> Use the given verbosity LEVEL, an integer. Choosing 0 means that >>> no output is produced, 1 is for quiet output; 2 is similar to 1 but >>> it additionally displays download URLs; 3 shows all the build log >>> output on standard error. >>> --8<---------------cut here---------------end--------------->8--- >> >> Maybe, we could add an option as =E2=80=99--list-verbosity=E2=80=99 whic= h would display >> that information. >> >> Well, the main issue, IMHO, is that the option =E2=80=99--verbosity=E2= =80=99 is not >> shared across various command-line scripts, but implemented script per >> script, IIRC. > > Oh, is it? That's not great. Well, maybe the first step would to refactor and move to %standard-build-options. Or something like that. guix/scripts/build.scm reads: --8<---------------cut here---------------start------------->8--- (define (show-help) (display (G_ "Usage: guix build [OPTION]... PACKAGE-OR-DERIVATION... Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) [...] (display (G_ " -v, --verbosity=3DLEVEL use the given verbosity LEVEL")) (define %options ;; Specifications of the command-line options. [...] (option '(#\v "verbosity") #t #f (lambda (opt name arg result) (let ((level (string->number* arg))) (alist-cons 'verbosity level (alist-delete 'verbosity result))))) --8<---------------cut here---------------end--------------->8--- And guix/scripts/package.scm reads: --8<---------------cut here---------------start------------->8--- (define (show-help) (display (G_ "Usage: guix package [OPTION]... Install, remove, or upgrade packages in a single transaction.\n")) [...] (display (G_ " -v, --verbosity=3DLEVEL use the given verbosity LEVEL")) (newline) (define %options ;; Specification of the command-line options. [...] (option '(#\v "verbosity") #t #f (lambda (opt name arg result arg-handler) (let ((level (string->number* arg))) (values (alist-cons 'verbosity level (alist-delete 'verbosity result)) #f)))) --8<---------------cut here---------------end--------------->8--- For some instances. :-) > Oh, is it? That's not great. I've never used it, but Guix already > soft-depends on guile-lib, and guile-lib provides a logging library. > Perhaps if we used that we would benefit from some standardized and > global way to perform logging across at least the host-side code? And > that'd help more straightforwardly reason and explain the levels? Well, I think the =E2=80=99verbosity=E2=80=99 is something passed to some C= ++ guix-daemon side and not used on Guile side. Cheers, simon