guile-devel
[Top][All Lists]
Advanced

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

guile-lib logging formatters


From: Christopher Baines
Subject: guile-lib logging formatters
Date: Mon, 29 Apr 2024 10:40:12 +0100
User-agent: mu4e 1.12.2; emacs 29.3

Hey!

I ran in to some problems with the <log-handler> formatter recently, it
seems it's being called with more than 3 arguments since the update to
guile-lib 0.2.8.

Can you advise on how to approach this?

I presume this isn't some internal interface I'm using accidentally? The
documentation states:

  #:formatter

    This optional parameter must be a function that takes three
    arguments: the log level, the time (as from current-time), and the
    log string itself. The function must return a string representing
    the formatted log.


So far I've been making this change as it's the neatest way I've come up
with of making the formatters both forward and backwards compatible:

  
https://git.savannah.gnu.org/cgit/guix/nar-herder.git/commit/?id=6be6f63c9f03b7bc928f7927a38da91f95f57ea2

It's not very neat though. I did try something like:

  (lambda* (lvl time str #:allow-other-keys) ...)

But that doesn't seem to be valid Guile.

Thanks,

Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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