From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91C6EC4338F for ; Tue, 27 Jul 2021 20:24:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A906C60F23 for ; Tue, 27 Jul 2021 20:24:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A906C60F23 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=stwcx.xyz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GZ7ZC6XHzz3bVT for ; Wed, 28 Jul 2021 06:24:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=stwcx.xyz header.i=@stwcx.xyz header.a=rsa-sha256 header.s=fm2 header.b=Dto3I+Zx; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=r+yJBn/p; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=stwcx.xyz (client-ip=64.147.123.20; helo=wout4-smtp.messagingengine.com; envelope-from=patrick@stwcx.xyz; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=stwcx.xyz header.i=@stwcx.xyz header.a=rsa-sha256 header.s=fm2 header.b=Dto3I+Zx; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=r+yJBn/p; dkim-atps=neutral Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GZ7Yf1C6bz2ydJ for ; Wed, 28 Jul 2021 06:24:21 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C2740320090E for ; Tue, 27 Jul 2021 16:24:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 27 Jul 2021 16:24:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stwcx.xyz; h= date:from:to:subject:message-id:mime-version:content-type; s= fm2; bh=+wN0yI6gnPk05HHyD7zsx8RhLbQ9q8IPcD1HObteYKQ=; b=Dto3I+Zx 3NZ4lD8w8gPEf8lDTHsdf7LbPGtToqa+KN9rKS8lNIXu1lDW95H1D4bOw4ypJTVI /vcvsBWefZ/mhumCx8a1K+Ngy7F2XEsToEzNfWIWg8GC3iYW3YV//ApX4Z1U7n7G Zhpiio/a1SUgZsbKqk1o4eub5XyxS4qkzlmDXHa1RTvO7zgRKv3wa2bDPgVh74G5 teksxWqZI0B4Askh+UFy9DT9RBxthQKUiGdQ//Gi8rJ3UGgpPzF8Ib/8IIySmRW5 eOB66cU5GC9xGc5BqTgyHzMGVP3zN10LTegC8wE0qeWuBywGGYEEad6O3hbEIZrJ zGrMWsiAXkNJgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=+wN0yI6gnPk05HHyD7zsx8RhLbQ9q 8IPcD1HObteYKQ=; b=r+yJBn/pLhKguV9Th1cBPA3Rkz6rgw2gLQnpTl8ReVqoP uQtPjy+jZNv6k3QUYeW/WuAS1YAbegX2tuYjT9Um0GvbWDwUV6bzIQ+6CHXB/KrS 0vu0qNbYl2uFrkSZVukEh2Q0Po3qqB3PKlV5BK+NdUiIErwS+xhy/jBzCly7cofw PLdJUf0eYvhiRWtRS6fk0n2+tQqMot674MwPJkKiY4qSyytqhx4NiQHBj4a4rzZV n7GAhug6Mmj19kIJKe/XuccMJFcCyFWn+aFh402p752bz7Rf40BM/ytSBhKvNtHY vPifFT6DejGlatMGiPkmtdugEbI6aqbb9jQNBawkA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgeejgddugedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkgggtugesghdtreertddtvden ucfhrhhomheprfgrthhrihgtkhcuhghilhhlihgrmhhsuceophgrthhrihgtkhesshhtfi gtgidrgiihiieqnecuggftrfgrthhtvghrnhepfedtffevgfegleelheetleekgfehudfh jeefgeegieefuddthedvtefhheevhedvnecuffhomhgrihhnpehophgvnhgsmhgtqdhprh hojhgvtghtrdighiiinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepphgrthhrihgtkhesshhtfigtgidrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 27 Jul 2021 16:24:15 -0400 (EDT) Date: Tue, 27 Jul 2021 15:24:14 -0500 From: Patrick Williams To: OpenBMC List Subject: `phosphor-logging` APIs (RFC) Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4V/J/CuypNMHDHWR" Content-Disposition: inline X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --4V/J/CuypNMHDHWR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, There have been discussions before on this mailing list about the APIs pres= ent in phosphor-logging and some of the shortcomings they have. I've implement= ed a new API, inside phosphor-logging, that I think resolves the issues discussed here and in some offline forums. If you have an interest in the logging APIs, I would appreciate any feedbac= k you may have. If there are additional issues with the APIs that I might have missed, please feel free to let me know and I'll see what can be done about resolving them. lg2: introduce motivation and API https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/45310 lg2: initial implementation of C++20 structured logging https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/45311 The main highlights of what I attempted to fix are: - Verbose and clumsy API for previous `logging::log`. - Poor compile-time identification of certain (common) issues. - Source location data is invalid (issue openbmc/openbmc#2207). - Useful data is missing from `journalctl` resulting in people working around it by generating strings with `fmt` et.al. - No logging present when running on a TTY. --=20 Patrick Williams --4V/J/CuypNMHDHWR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEBGD9ii4LE9cNbqJBqwNHzC0AwRkFAmEAa2wACgkQqwNHzC0A wRnuNRAAlx5L+fBpBN5m9ppqyvdLU9dLeETIhkrvcLeDxw9fVvYU5nOPMlwxqBU7 jAnJ9bVYdX+GvxqT3f70yfJrb5isLK8Mh+H8wko0JtIfsLX+Q7lza4JDi6y6wSIZ 0MPD7Gl+EUxGBsMVdjvbwCyW4yXnyo453yMf3N6Fuyg7UgJkVfGb8TBMTtBPpmcD vsOVwjUdzsh5ffqQLqZGXDf8C4ZobwjwG09oVRmLd8zYypbpQmVU+VB+l8V+QVHA PkOCyhOIJu+o2W2KnUV8jTbhUUiVu06+TZibKi+YjqaeHxRLM/OEDrAyFHqDGhvr UbkvWrvbNU4wOEOTVEsa7JbmBLFe/7ioyv9oxk+PKEvidIQMHHodrLfrBq5qTgO0 lrbxayfIqO0asagfELXPX6TlPsRc4sSYZy/fl2hIwj4bsOg9eKOtH68ShAk3Kai5 fGHIRBTXEGcXjPsoGz3+0z1RX6Xl6CJ+/S/exSPIeuCJjQnu7K3wjeoSlszyhILJ +5hvKTcB/DfobM9NWvyHEX+2i5xxswTftZCicMeIj6E8Em5xST/I88SrhFTZevNm KcAhOTlF2C9hXURnzjVHrUazBr2HshPXD6mAlU3Pu8m3p7C6E3YF2VP6ZjyIic0L /4MqsbwI1lxjf4ukZVl15QavbYHxmsltYVw9xwjbmubDsEL4fGU= =VDdT -----END PGP SIGNATURE----- --4V/J/CuypNMHDHWR--