From patchwork Wed Dec 4 09:27:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Dingwall X-Patchwork-Id: 11272541 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A5E5138C for ; Wed, 4 Dec 2019 09:28:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 E2D1B20675 for ; Wed, 4 Dec 2019 09:28:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2D1B20675 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dingwall.me.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1icQwR-0001qt-6o; Wed, 04 Dec 2019 09:27:27 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1icQwQ-0001qi-FR for xen-devel@lists.xenproject.org; Wed, 04 Dec 2019 09:27:26 +0000 X-Inumbo-ID: 476f94f8-1678-11ea-a0d2-bc764e2007e4 Received: from know-smtprelay-omc-3.server.virginmedia.net (unknown [80.0.253.67]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 476f94f8-1678-11ea-a0d2-bc764e2007e4; Wed, 04 Dec 2019 09:27:24 +0000 (UTC) Received: from mail0.xen.dingwall.me.uk ([82.47.84.47]) by cmsmtp with ESMTPA id cQwNilTndMk4gcQwNiUugq; Wed, 04 Dec 2019 09:27:23 +0000 X-Originating-IP: [82.47.84.47] X-Authenticated-User: james.dingwall@blueyonder.co.uk X-Spam: 0 X-Authority: v=2.3 cv=Rfa+9Wlv c=1 sm=1 tr=0 a=0bfgdX8EJi0Cr9X0x0jFDA==:117 a=0bfgdX8EJi0Cr9X0x0jFDA==:17 a=xqWC_Br6kY4A:10 a=pxVhFHJ0LMsA:10 a=GfapET-l_dkBDNbsHL0A:9 Received: from localhost (localhost [IPv6:::1]) by mail0.xen.dingwall.me.uk (Postfix) with ESMTP id BE59115941C; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at dingwall.me.uk Received: from mail0.xen.dingwall.me.uk ([IPv6:::1]) by localhost (mail0.xen.dingwall.me.uk [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id gZQ54oq4ddN2; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) Received: from behemoth.dingwall.me.uk (behemoth.dingwall.me.uk [192.168.1.5]) by dingwall.me.uk (Postfix) with ESMTP id 8521F159413; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) Received: by behemoth.dingwall.me.uk (Postfix, from userid 1000) id 7FF5F140E15; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) From: james-xen@dingwall.me.uk To: xen-devel@lists.xenproject.org Date: Wed, 4 Dec 2019 09:27:35 +0000 Message-Id: <20191204092739.18177-1-james-xen@dingwall.me.uk> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfMwp32QxQOJTLzY+MwLbkx+8ze7848ZeIpY21eg5iEbuT67dRWEDzBIZz+j+umI7w76y5rxBfu856CrHgxa/YOXRtUSORrITzE+v19eq5q76WJKpaTjQ /Pgitv451uww3oLLDbyDux7EtEXLFuyAuTfMdUyvcFYX3wXP/A6B+BWqqvQWxWnL2mo1qNVEPEoe2F8xZOStrT5vwPvGiyidTC1kPgtVHfQGxKC9V4F2jW/Z dVDu2Hl5Z/wcpKyVSwziTxnfUeiMinxW83EYh/C2+40= Subject: [Xen-devel] [PATCH 0/4] xenstore domain: improve logging capabilities X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi, When xenstore is run as a domain there is no way to get log messages from the process. This small series adds a new --trace-syslog option which will copy trace() and xprintf() messages to syslog, in the MiniOS case this directs to the kernel printk(). When it is enabled in the xenstore domain messages are recorded on the hypervisor console according to the guest_loglvl. A new xenstore control is also added so that the functionality can be toggled dynamically at runtime. I think there is possibly some room for further enhancements so that it is more easily possible to log at different priorities rather than a simple trace() = LOG_DEBUG, xprintf() = LOG_ERR. Perhaps the addition of some more macros similar to eprintf could be useful too. If such change would be considered useful then some guidance on the most appropriate direction to take would be helpful. The series is based on 4.11.3 but I can rebase it to master. James