[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RESEND PATCH 07/12] golang/xenlight: add logging conveniences for within xenlight
- To: Nick Rosbrook <rosbrookn@xxxxxxxxx>
- From: George Dunlap <George.Dunlap@xxxxxxxxxx>
- Date: Fri, 18 Jun 2021 16:30:40 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MZ6c8awNEGrWMtofaktIYlmJmZ3wfwjrlvmEp2hFHfk=; b=eGYwDqomtEjhyiJ+U1uS8phiO6gmLkZ077Pt5GmHwdabHbQk3boUKJfEA8ak3emlLiTUNPQPXqh+VttxQHNCNPQK63wBeXitbN1dVNKnWVoyOi6zWoe7NK6WPkRo0Nfoft2hPgwLJs6PgdEu5xLmu6TvT4SwgyxqTqcUeUODd87iJqJ0kKERshkhGiUR+5Li7B2I6k92VX/SVqj9fSvXQLyI8z8jPsYNnuZu8kL3ltZQ/CrLC4XQGbWUTgwm1+RZLH3elhjL2YAn2QcnPgFNyIP7oxorvFuvJNzBK/zTfff6ot7mVYgpzkkQXr0VZn/R49YVFYBcWOZlp9Tf8DCraw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fpLRzBRHUX/qOBt6Ibfyc2g2Znagn0nXiLyIVDnm/02ckUzdNt8V3AqlqF5DxORMWy4xwfFtP3wtB1AwfoKLpc8LuktPHea4DGNQW9/CjumbZdkRPPprVMyRQ7i4RVjB0MMroO8RBXJMHfG17vc3gj07nbWmwBPtBpDtaSWi85ye6BJFm3or17oYk3VqH/+hMoD4hZSdwa5ApqCWyQNc0VsMC4ZfRtfXKekBAzwDvES3Z2r1eu2uVVGOgAmUhAZQuzgRH7u48bNlpwpPmS2rrhC0wtiWrbl+gHBEdaISO+8P/9q/C86Gf0AGjeJuvtp5qQsUTAmZhHfJdl/HIb3s/w==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Fri, 18 Jun 2021 16:32:39 +0000
- Ironport-hdrordr: A9a23:VWzC2q9XaBA6DVfTPOduk+Fodb1zdoMgy1knxilNoENuHPBwxv rAoB1E73PJYW4qKQ0dcdDpAtjlfZtFnaQFobX5To3SIzUO31HYb72KjLGSggEIfheeygcz79 YZT0ETMqyTMbE+t7eG3ODaKadj/DDkytHSuQ629R4EJmsGC9AC0+46MHfgLqQffngbOXNTLu v62iMznUvYRZ1hVLXcOpBqZZmnm/T70LbdJTIWDR8u7weDyRmy7qThLhSe1hACFxtS3LYL6w H+4knEz5Tml8v+5g7X1mfV4ZgTssDm0MF/CMuFjdVQAinwizyveJ9qV9S5zXQISaCUmREXee v30k4d1vdImivsl6aO0EDQMjzboXATArnZuAWlaDXY0JHErXkBerR8bMpiA2rkAgwbzY5BOe twrhGknosSAhXakCvn4d/UExlsi0qvuHIn1fUelnpFTOIlGfJsRRx2xjIkLH4sJlOw1GkcKp glMCgc3ochTXqKK3TC+mV/yt2lWXo+Wh+AX0gZo8SQlzxbhmpwwUcUzNEW2i5ozuNzd7BUo+ Dfdqh4nrBHScEbKap7GecaWMOyTmjAWwjFPm6eKUnuUKsHJ3XOoZjq56hd3pDnRHXJ9up7pH 3laiIXiYcfQTObNSS+5uwDzvmWehTJYd3E8LAo23FWgMyPeIbW
- Ironport-sdr: 8woQerB6Sa97VYgc2L5hko8jmDVULX+TFSL9QGxYLgSMH+0KWufluHlQcnsjwtRi5YVI6Sf1o9 +I2aX/1eav2gRKPqy49S9uJnuWDr5K0W6hP5lkUWItkJTfOGdbjX4wZu2o4Oq+GuyigbBwaQcJ mFxZHwKShKvkQnCyWnEe7MgqVwJcniyhR0Js66k/qL+cxzEbEuLIcu6xGSaYxyD632vvBVb/6L uTha98BBrTLCicTN6hymeJNXNtiIdFre9Lw0P7pVaMPTZ9YY4qtcjDqznFGhSe2+beG5fFsMTf wzw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHXUNy8b62kbX7r3k+nzGZDJK+dZqsZ5r2AgAABRgCAACL1gIAAEdqA
- Thread-topic: [RESEND PATCH 07/12] golang/xenlight: add logging conveniences for within xenlight
> On Jun 18, 2021, at 4:26 PM, Nick Rosbrook <rosbrookn@xxxxxxxxx> wrote:
>
> On Fri, Jun 18, 2021 at 01:21:40PM +0000, George Dunlap wrote:
>>
>>
>>> On Jun 18, 2021, at 2:17 PM, George Dunlap <George.Dunlap@xxxxxxxxxx> wrote:
>>>
>>>
>>>
>>>> On May 24, 2021, at 9:36 PM, Nick Rosbrook <rosbrookn@xxxxxxxxx> 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 <rosbrookn@xxxxxxxxxxxx>
>>>
>>> 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?
I don’t have a super-strong preference. I was just thinking that xl and libxl
both use the same logger, so it would make sense for whatever was built on top
of xenlight to use the same logger.
But I guess we’d want the exported version to be able to pass in its own
“context”; since it’s more work than just capitalizing the method names, I’d
say go ahead and postpone that for now.
Thanks,
-George
|