Subject: Re: [bug#68946] [PATCH v2] guix: Add logging module.

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 22 Feb 2024 20:13:33 -0500

Hi Ludovic,

Ludovic Courtès <[email-masked]> writes:

> Hi!
>
> Maxim Cournoyer <[email-masked]> skribis:
>
>> * configure.ac: Require Guile-Lib.
>> * guix/logging.scm: New module.
>> * Makefile.am (MODULES): Register it.
>> * guix/ui.scm (show-guix-help): Document --log-level global option.
>> (%log-level): New parameter.
>> (run-guix-command): Init logging.
>> (run-guix): Parse new --log-level option.
>>
>> Change-Id: I5026a0d62119615fec3cd0131309f9bcc346a7e9
>
> Two quick notes: I think it’s be best to avoid depending on Guile-Lib
> “just” for this (it’s not clear to me what it’s maintenance status is),
> and it’d be great to have concrete use case.

David Pirotte is doing great for Guile-Lib maintenance.  It's better
maintained, than say, Guile-Git, which we also depend on :-).  It has a
good test suite and is small.  We already depend on it for a couple of
our updaters, for its htmlprag HTML parser, so combined with this log
facility, that seems enough to justify hard depending on it.

> My concern with logging is that it’s not a good fit for the functional
> parts (unless it has a functional interface like ‘pk’, but that’s still
> sorta “cluttering” otherwise functional code), and I’m not sure which
> imperative part it could be used for (I don’t doubt there’s such a
> thing, but I lack imagination).

I understand the concern, but I think to be able to trace execution
easily at run time with a simple `--log-level=debug' would provide value
enough (as a developer aid) to justify it.

-- 
Thanks,
Maxim