From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wGnkLZKQ1GHZ4AAAgWs5BA (envelope-from ) for ; Tue, 04 Jan 2022 19:23:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eEWBKpKQ1GErjgAAauVa8A (envelope-from ) for ; Tue, 04 Jan 2022 19:23:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3000E365A0 for ; Tue, 4 Jan 2022 19:23:14 +0100 (CET) Received: from localhost ([::1]:52498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4oSn-0003ju-A8 for larch@yhetil.org; Tue, 04 Jan 2022 13:23:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4mNu-0005CP-PU for bug-guix@gnu.org; Tue, 04 Jan 2022 11:10:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4mNu-0007xo-FH for bug-guix@gnu.org; Tue, 04 Jan 2022 11:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n4mNu-00064g-BK for bug-guix@gnu.org; Tue, 04 Jan 2022 11:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#36510: [PATCH v3] base: Annotate output with job information. References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> In-Reply-To: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> Resent-From: Dale Mellor Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 04 Jan 2022 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36510 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 36510@debbugs.gnu.org, Maxim Cournoyer Received: via spool by 36510-submit@debbugs.gnu.org id=B36510.164131255123253 (code B ref 36510); Tue, 04 Jan 2022 16:10:02 +0000 Received: (at 36510) by debbugs.gnu.org; 4 Jan 2022 16:09:11 +0000 Received: from localhost ([127.0.0.1]:38543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4mN4-00062w-Is for submit@debbugs.gnu.org; Tue, 04 Jan 2022 11:09:11 -0500 Received: from rdmp.org ([52.19.174.175]:49848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4jl9-0000qP-3i for 36510@debbugs.gnu.org; Tue, 04 Jan 2022 08:21:51 -0500 Received: from [127.0.0.1] (helo=[IPv6:::1]) by rdmp.org with esmtp (Exim 4.94) (envelope-from ) id 1n4jl3-0003az-5I; Tue, 04 Jan 2022 13:21:45 +0000 Message-ID: <0b026b7cd95151875bf47958fc70b52764816d71.camel@rdmp.org> From: Dale Mellor Date: Tue, 04 Jan 2022 13:21:44 +0000 Organization: DM Bespoke Computer Solutions Ltd Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 04 Jan 2022 11:09:09 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 04 Jan 2022 13:23:03 -0500 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: mcron-lsfnyl@rdmp.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641320594; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=MGo5a+PahLJOmkVFuLOb+roWsLu3qVvwu0upGYGIRGE=; b=VAWesXlD2Wz8l9utZ/Z/9tdKelyAybll4DAEam1EafkA9aNODn1nNSz+7lOAc4lv5bzGBb EtPdWp4r8Dv/FTC6LJ/+r9q2s3KsDJNgyiiji7SK7HjSLyPgR+8lr5fYHLxoNPA1thqzuY rZaxS4DGq0fksXsJF8COcBQdS/+MsLB1JhSaC2IfKKygEllBydNhNm/vSimHmPACVKTx9Y aj6uzr5oQK675KcE+o0I688gIyiEobbX+qOEAz0BXc2pw9jPeYOraQ0KP7a4ptEDieh/8o zS/LXr5LmBQI6OKcGO2Sixts2NybqtYScCn3UBo4h2bRB5zW73XpFPvQrNHYHg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641320594; a=rsa-sha256; cv=none; b=V6LDGIPc6B1IhRLIziN3N/aDcLHEwT+uqADSmnsnVHJHFyE8t3S63ESrYm/19HwzL+zXNx 8MiKk9KUWeysmbOp/3SuqYsxidE7SC7J6PF/rq/xwmZSGadnRtVTPJgKyAohWMkii3oPbT ujKsLo5cJkgRVCB8XczQefKPzf4vygF3O3jZ0PRQnfQVuhNbaQuC4BF1GLTLgrBnuk6BHf qB3zsb9UQey/J1ujrmdjguodliJLhClbLIhiGjAQnaj+DkzL4w73psNYgr76Ar6H4pzuei NoemQwA283moKnNd+PVEItwdxtepNpH1NjrJpSyB3sxnxMKeT4EooLeiuRoYig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.09 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3000E365A0 X-Spam-Score: -3.09 X-Migadu-Scanner: scn1.migadu.com X-TUID: l7GWy9fR+/D4 Hi, sorry for the delay but I've had a bit of time over Christmas to look things over. I've given this a lot of consideration. I am happy to drop compatibility with guile-2.2 and older; I think we can make a minor version bump for this break with legacy. Does this belong in mcron? The mcron source code is currently 3,000 lines, to which you are bringing over 500 new ones to make a facility which is geared towards debugging in the GUIX system (I am all-in on GUIX myself, but mcron is a generic GNU program with use-cases outside of this system). I wonder if this is the best place: perhaps it is shepherd, which is responsible for the /var/log/mcron.log file, to be responsible for the amended logging messages? And then again, isn't this exactly what syslogd does anyway? Most likely timings will be more accurate if they are generated in mcron. In your use-case, of debugging the system, I would think that more specialized messages placed directly in the cron jobs themselves would be a better aid to your work, as you can target them to the problem at hand. And you could send those to syslogd if you wanted. The output is a little unpredictable. The script (which is admittedly somewhat pathological) (job '(next-second '(0 30)) '(begin (display "test: ") (system "date"))) produces 2022-01-04T11:24:00 (...): running... 2022-01-04T11:24:00 (...): Tue 4 Jan 11:24:00 GMT 2022 2022-01-04T11:24:00 (...): test: completed in 0.022s 2022-01-04T11:24:30 (...): running... 2022-01-04T11:24:30 (...): Tue 4 Jan 11:24:30 GMT 2022 2022-01-04T11:25:00 (...): running... 2022-01-04T11:25:00 (...): Tue 4 Jan 11:25:00 GMT 2022 ... But all things considered your changes are generally useful to have, including outside of the GUIX system, and I would very much like to have them there. But to be sure not to break any existing applications, I would like the changes to be opt-in via a command-line switch -l; the --log-format option can remain to customize this (please also make -L a short option alternative; also -D as short for --date-format). I am willing and able to do this work myself in a reasonable time-frame if you would like me to. Best wishes, Dale