From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Newsgroups: gmane.lisp.guile.devel
Subject: [Guile-Lib PATCH 0/6] Make log-msg accept source properties for
 displaying source location
Date: Mon,  5 Feb 2024 14:40:30 -0500
Message-ID: <20240205194049.7757-1-maxim.cournoyer@gmail.com>
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="17131"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: David Pirotte <david@altosw.be>,
 Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: guile-devel@gnu.org
Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Feb 05 20:41:21 2024
Return-path: <guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org>
Envelope-to: guile-devel@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org>)
	id 1rX4qH-0004Gd-8h
	for guile-devel@m.gmane-mx.org; Mon, 05 Feb 2024 20:41:21 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guile-devel-bounces@gnu.org>)
	id 1rX4ps-0005WW-Lu; Mon, 05 Feb 2024 14:40:56 -0500
Original-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 <maxim.cournoyer@gmail.com>)
 id 1rX4pr-0005WF-0W
 for guile-devel@gnu.org; Mon, 05 Feb 2024 14:40:55 -0500
Original-Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@gmail.com>)
 id 1rX4pp-0003NK-G7
 for guile-devel@gnu.org; Mon, 05 Feb 2024 14:40:54 -0500
Original-Received: by mail-qk1-x736.google.com with SMTP id
 af79cd13be357-783f553fdabso253762585a.0
 for <guile-devel@gnu.org>; Mon, 05 Feb 2024 11:40:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1707162052; x=1707766852; darn=gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=m3tgb5UKTwNLPI+2eMAEc4NIL6AqBxq7UzN5lOPtOcU=;
 b=efyR0gDLDmh7HjF/M5IkPd6Bw7kn3r44JAfN8ihg3c++aWEXipX35LoZNdBo+agGS2
 7KYYloWJhtWsxIj0f8b6/hStjhkihfV+iceGAoCrHXnJYML5oSeKUm3qz5cbgh3+IR5v
 EEBKk8dZTq93vHVMZ1A0RwDJaP0+/KXqI0bKZW3i+4FYTO0MAlIa5jhBnreO8WeOF/rL
 o6LHuXNHvGuxZ84qb6rlA+WxyP2U+6/dx+rv3bQPGsi1F7ej1UG+nNjEnifGPK3xSAGy
 yE46ID1n65+VNH6Tt1eWjwKtJJQuSSYxH3V6ecruX8nOvG0Kts0vpMc2TMJAYqr5SjLN
 eRdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1707162052; x=1707766852;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=m3tgb5UKTwNLPI+2eMAEc4NIL6AqBxq7UzN5lOPtOcU=;
 b=mij48lnAWLpnHoR80N268SUdibkGQPExR1WaQ8ENhL3+qcOUI2X0LLDQj+Vo3cCgpq
 5sRaq1iy8Ba2M00yj1VexV5CF4u6Y7OAOpo8nAn+aszgQbL+8i965IgeohtuGJgn8Xo3
 GbtfJSw2VuGMfMBRbk6BGZ6zRVu71Q770yWBT+fYktLhon4FIXCiWm7f9IEJSK5kLAc+
 zhHbxx1ZUjUv8/dxGV5CTqNSByGAC2dZqJ3ZDqjCTmYOxU51GypJcCSST9x1dT3NTIsu
 xIkmeaiqg9vFbYaTtUZfsZ3BcApKN/P/r2ufbGYLg6I4gPSQISf+Cwb9/baFado8bin5
 8Kbg==
X-Gm-Message-State: AOJu0YyR4zDC3CCgRLaDoggxqa//asZK2rxdsHGhU5HYlURnTzPI9cqW
 LQuTLSY5LB6HbiCIEpjF7J4/+X0oipV2n/XoDTXNdOZtZrvM/gI4XLi5w8ST
X-Google-Smtp-Source: AGHT+IGgur1Ti6DBlBuJ60XR6hlOyPzYI84mNsp3Vynxfn4Z3hlcjnqncrG9qG7o52fF55hwO2GZMg==
X-Received: by 2002:a05:620a:3851:b0:783:1887:80e6 with SMTP id
 po17-20020a05620a385100b00783188780e6mr1090910qkn.35.1707162051741; 
 Mon, 05 Feb 2024 11:40:51 -0800 (PST)
X-Forwarded-Encrypted: i=0;
 AJvYcCXLnv/pTOlwQFQPF6MtUgLV5j799YIFvZgdP47AdhoBxDUSURUVXJSen1aEBWB9DjL6dQUCcOsGQG1oV9bFn2C4y9nYY+eZidKB
Original-Received: from localhost.localdomain (dsl-10-130-152.b2b2c.ca. [72.10.130.152])
 by smtp.gmail.com with ESMTPSA id
 a12-20020a05620a102c00b00783da2644besm217367qkk.136.2024.02.05.11.40.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Feb 2024 11:40:51 -0800 (PST)
X-Mailer: git-send-email 2.41.0
Received-SPF: pass client-ip=2607:f8b0:4864:20::736;
 envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x736.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: guile-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Developers list for Guile,
 the GNU extensibility library" <guile-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guile-devel>,
 <mailto:guile-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guile-devel>
List-Post: <mailto:guile-devel@gnu.org>
List-Help: <mailto:guile-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guile-devel>,
 <mailto:guile-devel-request@gnu.org?subject=subscribe>
Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org
Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.lisp.guile.devel:22288
Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.devel/22288>

The main change of this series is adding the ability to pass source
properties (such as can be obtained via syntax-source in macros) to
the `log-msg' call, and have the default log formatter use it to
display the source location of the corresponding call.

It also fixes a few minor issues spotted while working with the
source, and calls `flush-log' at the end of `accept-log' to avoid
long delays caused by the default block buffering when the log traffic
is low.


Maxim Cournoyer (6):
  configure.ac: Fix typo in message.
  Use /bin/sh in update-api script shebang.
  tests: guile-library.api: Re-generate.
  logging: Allow passing source properties to `log-msg'.
  logging: Adjust default log-formatter output.
  logger: Call flush-log at the end of accept-log.

 configure.ac                  |   2 +-
 src/logging/logger.scm        |  90 +++++++++----
 unit-tests/guile-library.api  | 245 ++--------------------------------
 unit-tests/logging.logger.scm |  18 ++-
 unit-tests/update-api         |   2 +-
 5 files changed, 87 insertions(+), 270 deletions(-)


base-commit: 8d0196230f80afcf4da33917fe8ae390a1560931
-- 
2.41.0