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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 3B387C48BDF for ; Fri, 18 Jun 2021 15:26:59 +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 F2D5C6100A for ; Fri, 18 Jun 2021 15:26:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2D5C6100A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.144786.266446 (Exim 4.92) (envelope-from ) id 1luGOQ-0000q6-QK; Fri, 18 Jun 2021 15:26:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 144786.266446; Fri, 18 Jun 2021 15:26:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1luGOQ-0000pz-MB; Fri, 18 Jun 2021 15:26:50 +0000 Received: by outflank-mailman (input) for mailman id 144786; Fri, 18 Jun 2021 15:26:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1luGOP-0000pp-72 for xen-devel@lists.xenproject.org; Fri, 18 Jun 2021 15:26:49 +0000 Received: from mail-qk1-x72e.google.com (unknown [2607:f8b0:4864:20::72e]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3b6b1a6a-e4da-426a-8cef-243edaadeef9; Fri, 18 Jun 2021 15:26:48 +0000 (UTC) Received: by mail-qk1-x72e.google.com with SMTP id j62so11819974qke.10 for ; Fri, 18 Jun 2021 08:26:48 -0700 (PDT) Received: from FED-nrosbr-BE.crux.rad.ainfosec.com (209-217-208-226.northland.net. [209.217.208.226]) by smtp.gmail.com with ESMTPSA id l127sm4119008qkc.64.2021.06.18.08.26.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jun 2021 08:26:48 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3b6b1a6a-e4da-426a-8cef-243edaadeef9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=SxFqflzAcIyPl7uL6HXezQivITkX16R0fc13SxV+fMI=; b=a7dZwfbWrrSQakyNMhkJ+rQkRxgwdUitHI99Knyjqq+uHumJO6CgiPkZX8bBhQO+7D NaFV7S481DnlcSxhDAmCGXk3ssMFRHU5DzYU9BOZhJimfse18cwXmCbI50vz4DCYBk9j RVGgTdstStVHSQqzCnH+p//wVl+NtjrVSewDyNkgDaRzu6eHAq/jj+4HTuMgWfKZk+p2 LuUBiRJv8I6svpdXF1h42gemXT2/NIUx+aZ57b7Saibrfo0F52qy0c8+7Nk84V70BXq2 NR42JtffbUbilad5dI1EJt61ZKfaep2TBPSd3yY2E7E7OabOisBub+JDBmdNflW3LaDX gmjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=SxFqflzAcIyPl7uL6HXezQivITkX16R0fc13SxV+fMI=; b=nLhESRx2Qb35oj0lkT7wqzkcELcOeRHewojOnifjQ6Ujiu15NHcHcC2vg7WkhU18Va +G8B+MObE9+gmV+4G+ZduAYkgjIwgEXf+mkFvUvrp0AiH3oChLzpmm+jxefPG0SYp9P2 YQ2eeTGum/icC1jcpGTnYGTcPbsX6ax6FpAoUG30kocJmzzARqF7IYbUC8lDMK4/JnHH /5xOEmVb1SKM0wrYeWSmSxAe/9fPvt/CT+djW2qbVlGARLr5Grj/5swUAq0M7OePb2tC LaGKsFyxvzPkeMTWKt4NGYaoh7vaXxZgQMgpsm/MUdVEd3cLJGsBUBqlQtMRMFpUTDEf R0ww== X-Gm-Message-State: AOAM5303h9EwxIA1qUVM6ntkcb6fB/bhxETpSaRN+wIJowaNwVly+M3F iy6looPfky0xhAGDwZWP5UM= X-Google-Smtp-Source: ABdhPJxITNsBPPE63e+W4wGhX1iAeeHLhOJDxz94jlSlhKk+55Hfn36hjW4yWKbIzRdpZ+Zh5FAm4A== X-Received: by 2002:a37:7cb:: with SMTP id 194mr1513234qkh.455.1624030008316; Fri, 18 Jun 2021 08:26:48 -0700 (PDT) Date: Fri, 18 Jun 2021 11:26:45 -0400 From: Nick Rosbrook To: George Dunlap Cc: "xen-devel@lists.xenproject.prg" , xen-devel , Nick Rosbrook , Ian Jackson , Wei Liu Subject: Re: [RESEND PATCH 07/12] golang/xenlight: add logging conveniences for within xenlight Message-ID: References: <452aac2489990ac0195c62d8cb820fbe5786c466.1621887506.git.rosbrookn@ainfosec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Jun 18, 2021 at 01:21:40PM +0000, George Dunlap wrote: > > > > On Jun 18, 2021, at 2:17 PM, George Dunlap wrote: > > > > > > > >> On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote: > >> > >> Add some logging methods to Context to provide easy use of the > >> Contenxt's xentoollog_logger. These are not exported, but the LogLevel > >> type is so that a later commit can allow the Context's log level to be > >> configurable. > >> > >> Becuase cgo does not support calling C functions with variable > >> arguments, e.g. xtl_log, add an xtl_log_wrap function to the cgo preamble > >> that accepts an already formatted string, and handle the formatting in > >> Go. > >> > >> Signed-off-by: Nick Rosbrook > > > > Looks good. One comment: > > Er, sorry, turns out I had rather more than one comment. Here’s one more: > > Is there any particular reason not to export the Ctx.Log[X]() functions? > No reason other than I tend to only export functions when I know they need to be exported. My motivation for adding these at the time was to help debug development. Would you prefer to export them then? Thanks, NR