[bug#68946,RFC,0/1] Add logging capability to Guix

Message ID cover.1707192720.git.maxim.cournoyer@gmail.com
Headers
Series Add logging capability to Guix |

Message

Maxim Cournoyer Feb. 6, 2024, 4:12 a.m. UTC
This adds the ability to simply log messages during execution, whose level can
be selected via a new '--log-level' option.

It relies on pending Guile features (SRFI 209 enums) [0] as well as some
modifications to Guile-Lib's logging library so that it can support source
properties [1].  To test, I symlink the 'guile' binary at the root of the
Guix checkout to my ~/src/guile/meta/guile built binary, and I build Guix with
'make GUILE=./guile', in an environment containing the modified guile-lib:

guix shell --pure -D guix --with-source=guile-lib=/home/maxim/src/guile-lib

Here's some dummy output just to show what the default format looks like:

2024-02-06 03:38:44 guix/derivations.scm:272:16: DEBUG: adding input #<<derivation-input> drv: #<derivation /gnu/store/2ll0ig7jn3w7rqsyfjl358r2q9lga15a-gcc-core-4.6.4.tar.gz.drv => /gnu/store/8fsrfzp53azpsb5n3rbh24n1bcrimzpj-gcc-core-4.6.4.tar.gz 7f60e5ea7af0> sub-derivations: ("out")> to list
2024-02-06 03:38:44 guix/derivations.scm:272:16: DEBUG: adding input #<<derivation-input> drv: #<derivation /gnu/store/5hmjcad7k2z2d8rc38p2jcsh88dvpqr6-gcc-g++-4.6.4.tar.gz.drv => /gnu/store/qbj186qvw9312ki8qqmxc5hx6izwp1km-gcc-g++-4.6.4.tar.gz 7f60e5ea7a00> sub-derivations: ("out")> to list

[0]  https://lists.gnu.org/archive/html/guile-devel/2023-12/msg00087.html
[1]  https://lists.gnu.org/archive/html/guile-devel/2024-02/msg00000.html


Maxim Cournoyer (1):
  guix: Add logging module.

 Makefile.am      |  5 ++-
 configure.ac     |  6 +--
 guix/logging.scm | 98 ++++++++++++++++++++++++++++++++++++++++++++++++
 guix/ui.scm      | 17 ++++++++-
 4 files changed, 120 insertions(+), 6 deletions(-)
 create mode 100644 guix/logging.scm


base-commit: c76004c574acc3291e8d2526fe534719473a87ff
  

Comments

Steve George Nov. 1, 2024, 9 p.m. UTC | #1
Hi,

Giving this a little nudge. I think the ball was with you Maxim to send a patch adding some initial logging to see if it becomes useful. Still happy to do so?

Steve / Futurile
  
Maxim Cournoyer July 28, 2025, 11:31 a.m. UTC | #2
Hi Steve,

Steve George <steve@futurile.net> writes:

> Hi,
>
> Giving this a little nudge. I think the ball was with you Maxim to
> send a patch adding some initial logging to see if it becomes
> useful. Still happy to do so?

Thanks for returning the ball! I've never heard back from patches sent
to Guile which I relied on in my original implementation (I had used
SRFI-209 enums to implement the log level) [0].  I guess I should try
again now that it's hosted on Codeberg.

[0]  https://www.mail-archive.com/guile-devel%40gnu.org/msg17167.html
  
Simon Tournier Aug. 22, 2025, 12:35 p.m. UTC | #3
Hi Maxim,

On Mon, 28 Jul 2025 at 20:31, Maxim Cournoyer <maxim@guixotic.coop> wrote:

> Thanks for returning the ball! I've never heard back from patches sent
> to Guile which I relied on in my original implementation (I had used
> SRFI-209 enums to implement the log level) [0].  I guess I should try
> again now that it's hosted on Codeberg.
>
> [0]  https://www.mail-archive.com/guile-devel%40gnu.org/msg17167.html

Feel free to report here how it’s going. :-)

Well, I think it could be very nice to add logging features to Guix.
Because when dealing with bug reports, the loop to get relevant
information is more than often annoying, both end. :-)

Cheers,
simon