[Guile-Lib PATCH v4 0/7] Make log-msg accept source properties for displaying source location

2024-02-25 Thread Maxim Cournoyer
The main change of this series is adding the ability to pass source properties (such as can be obtained via syntax-source in macros, for example [0]) to the `log-msg' call, and have the default log formatter use it to display the source location of the corresponding call. The procedure name wher

[Guile-Lib PATCH v4 5/7] logging: Adjust default log-formatter output.

2024-02-25 Thread Maxim Cournoyer
The log level is always in uppercase, and its surrounding parentheses are dropped. * src/logging/logger.scm (default-log-formatter): Uppercase level and strip its surrounding parens. * unit-tests/logging.logger.scm: Adjust expected output accordingly. --- (no changes since v1) src/loggin

[Guile-Lib PATCH v4 2/7] Use /bin/sh in update-api script shebang.

2024-02-25 Thread Maxim Cournoyer
* unit-tests/update-api: Replace /bin/bash with /bin/sh. --- (no changes since v1) unit-tests/update-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit-tests/update-api b/unit-tests/update-api index 8824c3f..392ce8b 100755 --- a/unit-tests/update-api +++ b/unit-tests/up

[Guile-Lib PATCH v4 4/7] logging: Allow passing source properties to `log-msg'.

2024-02-25 Thread Maxim Cournoyer
* src/logging/logger.scm (log-helper) [source-properties]: New positional argument, which is passed to `accept-log'. (log-msg): Update doc. Add two new variants that accept source properties. Annotate more LVL arguments with their type to ensure proper resolution. (default-log-formatt

[Guile-Lib PATCH v4 3/7] tests: guile-library.api: Re-generate.

2024-02-25 Thread Maxim Cournoyer
The file was regenerated by running 'make -C unit-tests guile-library.api.update'. * unit-tests/guile-library.api: Regenerate. --- (no changes since v1) unit-tests/guile-library.api | 239 +-- 1 file changed, 5 insertions(+), 234 deletions(-) diff --git a/un

[Guile-Lib PATCH v4 6/7] logging: Make procedure name available to the log formatter.

2024-02-25 Thread Maxim Cournoyer
* src/logging/logger.scm (log-helper): Retrieve procedure name and pass it to `accept-log'. (default-log-formatter): Register new proc-name keyword argument, and include it in formatted message. (accept-log): New proc-name positional argument; pass it to log-formatter. * unit-tests/gui

[Guile-Lib PATCH v4 1/7] configure.ac: Fix typo in message.

2024-02-25 Thread Maxim Cournoyer
--- (no changes since v1) configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7171296..e8f1bba 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ dnl distcheck' are aware it is a wip version. AC_INIT( [guile-lib],

[Guile-Lib PATCH v4 7/7] logging: Call flush-log at the end of accept-log.

2024-02-25 Thread Maxim Cournoyer
This is to avoid long block buffering of log messages, which would causes the log messages to be delayed, which is likely to confuse users attempting to follow the logs in real time (see: https://lists.gnu.org/archive/html/guile-devel/2024-01/msg0.html). * src/logging/logger.scm (accep