From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?TWF0w7rFoQ==?= Goljer Newsgroups: gmane.emacs.devel Subject: Re: New (only?) extensible logging package for Emacs Date: Mon, 13 Mar 2023 18:25:42 +0100 Message-ID: <87cz5cmull.fsf@gmail.com> References: <875yb7tnyd.fsf@gmail.com> <1624013056.316850.1678548472770@office.mailbox.org> <87zg8hpytt.fsf@gmail.com> <87v8j4pyyj.fsf@gmail.com> <1152386106.488629.1678718629900@office.mailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Thomas Koch , Ruijie Yu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 14 04:25:48 2023 Return-path: Envelope-to: ged-emacs-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 1pbvIK-0000S0-GZ for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Mar 2023 04:25:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbvHJ-0004rG-LC; Mon, 13 Mar 2023 23:24:45 -0400 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 1pblvh-0004kE-Sn for emacs-devel@gnu.org; Mon, 13 Mar 2023 13:25:49 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pblvf-0005UG-PO for emacs-devel@gnu.org; Mon, 13 Mar 2023 13:25:49 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id r11so124638edd.5 for ; Mon, 13 Mar 2023 10:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678728345; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=w8MQt8CH3oWU8uBGDx9wNzpSWQpS6u6XE/ZdtOtUSJA=; b=DKeF8iIgl52TjAkB1UarjySdE3z9gMZDWRocPQMfR3qvSGDUloFn79n9C/fijqdPiH 20ICGhneBh6sD4zaK6O4UzzWiOziEojou1Qz71/txZ7uY4NY4vp4CY4F7Wle2Bwj9w0M +LAM5wa7wMKtNqWz9FVJXDziDPtaFgr421AzNW01oOUjXdzmtimLel8wfBH7zalsqR0e /BXdPXDb1FZa1IvZVT/Y088VZQs4LLrHtTe1AR+Z69iWkuF2jqea2jKFWCOq2SaaTVUG BgOD/E4boANn6wx9Vzs0FzKW4acLOFGka4sNusR9A+fmX32j93dp8XMPI3mbJyLabrKF pNog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678728345; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w8MQt8CH3oWU8uBGDx9wNzpSWQpS6u6XE/ZdtOtUSJA=; b=T3OE6klZW4Lv7AIO1yfVjtI7uWDwoS2yuHteqBB0NbGk/K7GQzwUZwTeTVVGVUas/Z BIJKojmiD86dcomPM8Ydc8aLmFcnB53vqsqqs6zF0EwAbbi8HoXOq1qVRIDFAroklTOM Do8ofaN915Q+N0o+3oMCCJpkq5ZD0Nh4C/NuD2TO/k2KeT2EyqpANxYQpiEhuloqJPmq q4jXdwFmLcGViIKH60weMqjbME04/tNdTNtkcdg14YgTCN/sxlu9AREIijTmAZSoGiKm bgDX6eF8l9bLrUtZtgHHxi2VgEYBEEwJWH+y84Az+BC4K87qe8x8IVA0a51Qo9f7VNnG eQCA== X-Gm-Message-State: AO0yUKXV4TqPlvWrFeQWHSr6dCYU6zj5ePJLku+xIAWaEsgmEVnzDgIf ibotTHnvTgigdvjHjURE//0PE1uuJfrGcg== X-Google-Smtp-Source: AK7set/BGUhtW0mHE5COp1uAA7n4ZWgZQfIcVqQTX/nYg6KvkJOIm3FpGyD9ZNgQT+1vYGFjFqh8tQ== X-Received: by 2002:a05:6402:7d7:b0:4de:51b7:4a59 with SMTP id u23-20020a05640207d700b004de51b74a59mr28514143edy.0.1678728344626; Mon, 13 Mar 2023 10:25:44 -0700 (PDT) Original-Received: from parmenides (ip-89-177-55-133.bb.vodafone.cz. [89.177.55.133]) by smtp.gmail.com with ESMTPSA id p2-20020a170906140200b0092be5f60dd5sm46936ejc.150.2023.03.13.10.25.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 10:25:43 -0700 (PDT) In-Reply-To: <1152386106.488629.1678718629900@office.mailbox.org> Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=matus.goljer@gmail.com; helo=mail-ed1-x531.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 13 Mar 2023 23:24:44 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304420 Archived-At: Thomas Koch writes: > Besides the backwards compatible /dev/log, journald also listens to a mor= e featureful native logging API: > https://systemd.io/JOURNAL_NATIVE_PROTOCOL/ > > As I understand, the journald API allows logs messages with more attached= information, e.g. origin of the message in the source code, a message ID o= r a link to documentation. Interesting, and pretty simple. I've implemented the journald appender, you can review it on github. Mar 13 18:21:55 parmenides emacs-lgr[516715]: [2023-03-13T17:21:55+0000] (F= ATAL) local.journald - Fatal log to journald nil Mar 13 18:21:56 parmenides emacs-lgr[516715]: [2023-03-13T17:21:56+0000] (E= RROR) local.journald - Error log to journald nil Mar 13 18:21:56 parmenides emacs-lgr[516715]: [2023-03-13T17:21:56+0000] (W= ARN) local.journald - Warn log to journald nil Mar 13 18:21:57 parmenides emacs-lgr[516715]: [2023-03-13T17:21:57+0000] (I= NFO) local.journald - Info log to journald nil Mar 13 18:21:57 parmenides emacs-lgr[516715]: [2023-03-13T17:21:57+0000] (D= EBUG) local.journald - Debug log to journald nil Mar 13 18:21:58 parmenides emacs-lgr[516715]: [2023-03-13T17:21:58+0000] (T= RACE) local.journald - Trace log to journald nil (the timestamps are superfluous but can be removed obviously, I just used the default message layout) Some of the meta fields (CODE_*) are also supported but it's super easy to add more. --=20 Best regards, Mat=C3=BA=C5=A1 Goljer