You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Craig Condit (Jira)" <ji...@apache.org> on 2023/11/20 17:01:00 UTC

[jira] [Closed] (YUNIKORN-1578) Use zap.Stringer instead of calling String on object

     [ https://issues.apache.org/jira/browse/YUNIKORN-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Condit closed YUNIKORN-1578.
----------------------------------

> Use zap.Stringer instead of calling String on object
> ----------------------------------------------------
>
>                 Key: YUNIKORN-1578
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1578
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - common, shim - kubernetes
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Qi Zhu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.3.0
>
>
> Throughout the code we have lots of places where we use the following call structure:
> {code:java}
> zap.String("text here", object.String()) {code}
> This causes the {{object.String()}} call to happen before we even consider if it needs to be logged. Zap has a lazy way of doing this that removes the call to create the stringĀ  until it is needed, after the level checks etc. The above call becomes:
> {code:java}
> zap.Stringer("text here", object) {code}
> Affect core and k8shim



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org