From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.devel Subject: [Guile-Lib PATCH v2 0/6] Make log-msg accept source properties for displaying source location Date: Mon, 5 Feb 2024 22:41:09 -0500 Message-ID: <20240206034201.28494-1-maxim.cournoyer@gmail.com> References: <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="9502"; mail-complaints-to="usenet@ciao.gmane.io" Cc: David Pirotte , Maxim Cournoyer To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Feb 06 04:42:27 2024 Return-path: 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 ) id 1rXCLq-0002Az-Fc for guile-devel@m.gmane-mx.org; Tue, 06 Feb 2024 04:42:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXCLY-0006Js-VC; Mon, 05 Feb 2024 22:42:08 -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 ) id 1rXCLX-0006JT-N9 for guile-devel@gnu.org; Mon, 05 Feb 2024 22:42:07 -0500 Original-Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXCLW-0002be-7y for guile-devel@gnu.org; Mon, 05 Feb 2024 22:42:07 -0500 Original-Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-783def87c8cso302977885a.0 for ; Mon, 05 Feb 2024 19:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707190924; x=1707795724; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bv8M4TUJpwqWSt8M99dKhvDlhchexOPUaOvcpOrOc0M=; b=Ocz9t19n3fma37jv+tzLjFIQnDc7aHjKO1I/foRuYtEqSWm7LcH+zQcpezOmFLd0z3 qozIBX7EphXU2r3+xDDvoi8G4g0/ASyckx/rs4odp4ddMuk8ZKEDmPiWkI7DUVKuvimM ygZ+eE+dVBIou9DOVusSfCtKrqnOxPn5alWPn/x6gqncJQg7p5dprqRl1gNhjNF/wA9C ai8XY0ezFnEjlFQWkaaHXA3ZYi74t/aHjOTLpWxSvNkdq81pCA2yo9l5RMiTpRSnGBVb 7k7azVc+QKi/71u3vG4IjMl/CQMI41dB71GHq1d7v+5Tx55QsSJdeEoTEGu3tJswZeum JnRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707190924; x=1707795724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bv8M4TUJpwqWSt8M99dKhvDlhchexOPUaOvcpOrOc0M=; b=vtq6nIyjYF39VQ+IoK8yV6Mwxs7spCIEUCIdCuf66Vf6C3gFMejGMY9nAxuXtBsdKu 3ugVyJUb1Q/KsMt14ujK9NFSRRkIPjx3uCVyTp9ye+VdCEqa7YyvAco9tyXj3h1a+gAY cZC8PQlOF20zIzjLS/WQ46U2JVqVL6AV5qS2l2csPhFPN8Pl85is9yQXRFtTL4/uK3QY Mwkit62o19QfSkyTvIy6SmuGl5J9Sql6Yg+h4cad5eh1FvSgsZyXb4ID/H2KRdywse1I 5ks1TsBRVItmAeZV8fmuT4eTZJitCex/9TzXLqwrc3ysDOtTBqmyfBfgvkoX/BvJAIho 0HnQ== X-Gm-Message-State: AOJu0YzUaVXUbiYSvoPM6qP+3VlxImN3DRiuQnjb6DiTM14+N58CAcj+ xK2P+UHb9ckg5GUcr1RiW0Xgy55xhJ3SnSMvMcQVEM6IbwXPv6N6Keo48I+G X-Google-Smtp-Source: AGHT+IHjQF6rglkBb0hbllyH/vaOuB+CMvEYhUhB/b+BDeRyBRLNPJGFLONw5c8JqAtL7QW54PWPzg== X-Received: by 2002:a05:6214:e8d:b0:68c:96ab:5671 with SMTP id hf13-20020a0562140e8d00b0068c96ab5671mr1047422qvb.4.1707190924627; Mon, 05 Feb 2024 19:42:04 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVKKIh2BIURAt5XLilPHcqWwDiKwdR0eN3protCkDw5pskf232guyCYKgo7V9BF/ulApvOkbBjRXyY+SxsUiqrVJA25aahKJSiz Original-Received: from localhost.localdomain (dsl-10-130-152.b2b2c.ca. [72.10.130.152]) by smtp.gmail.com with ESMTPSA id mv6-20020a056214338600b0068c963dd12asm626458qvb.86.2024.02.05.19.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 19:42:04 -0800 (PST) X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240205194049.7757-1-maxim.cournoyer@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x729.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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:22295 Archived-At: 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. Changes in v2: - Relax log-msg typing on source-properties, as it can also be #f, for example when a file has not been byte compiled and syntax properties are unavailable 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 | 247 ++-------------------------------- unit-tests/logging.logger.scm | 18 ++- unit-tests/update-api | 2 +- 5 files changed, 88 insertions(+), 271 deletions(-) base-commit: 8d0196230f80afcf4da33917fe8ae390a1560931 -- 2.41.0