Skip to content

Conversation

@hzxuzhonghu
Copy link
Member

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
@hzxuzhonghu
Copy link
Member Author

Fix #835

@codecov
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 52.77%. Comparing base (0956425) to head (fb8c42e).
Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
pkg/logger/logger.go 77.77% 2 Missing ⚠️
Files with missing lines Coverage Δ
pkg/auth/rbac.go 79.77% <ø> (ø)
pkg/bpf/bpf.go 41.81% <ø> (ø)
pkg/cache/v2/listener.go 49.33% <ø> (ø)
pkg/cache/v2/maps/listener.go 36.11% <ø> (ø)
pkg/cni/install.go 36.50% <ø> (ø)
pkg/cni/plugin/plugin.go 0.00% <ø> (ø)
pkg/controller/ads/ads_controller.go 93.33% <ø> (ø)
pkg/controller/bypass/bypass_controller.go 34.09% <ø> (ø)
pkg/controller/config/config.go 63.46% <ø> (ø)
pkg/controller/controller.go 0.00% <ø> (ø)
... and 9 more

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d83baf8...fb8c42e. Read the comment docs.


var (
log = logger.NewLoggerField("pkg/telemetry")
log = logger.NewLoggerScope("pkg/telemetry")
Copy link
Contributor

@LiZhenCheng9527 LiZhenCheng9527 Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
log = logger.NewLoggerScope("pkg/telemetry")
log = logger.NewLoggerScope("telemetry")

or controller/telemetry

pkg/auth/rbac.go Outdated

var (
log = logger.NewLoggerField("pkg/auth")
log = logger.NewLoggerScope("pkg/auth")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log = logger.NewLoggerScope("pkg/auth")
log = logger.NewLoggerScope("auth")

pkg as prefix doens't seem to make sense?

pkg/bpf/bpf.go Outdated

var (
log = logger.NewLoggerField("pkg/bpf")
log = logger.NewLoggerScope("pkg/bpf")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log = logger.NewLoggerScope("pkg/bpf")
log = logger.NewLoggerScope("bpf")

ditto

Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
@Okabe-Rintarou-0
Copy link
Member

/lgtm

@nlgwcy
Copy link
Contributor

nlgwcy commented Sep 14, 2024

/lgtm
/approve

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nlgwcy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nlgwcy nlgwcy merged commit 53caaa8 into kmesh-net:main Sep 14, 2024
@hzxuzhonghu hzxuzhonghu deleted the logger-improve branch September 14, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants