Skip to content

Use NGF Logger in Client-Go Library #1101

Closed
@pleshakov

Description

@pleshakov

Initialize klog to NGF logger so that client-go logs become consistent with NGF loggers.

So that we avoid inconsistencies like below:

I0927 21:14:42.702979       7 leaderelection.go:250] attempting to acquire leader lease nginx-gateway/nginx-gateway-leader-election...
{"level":"info","ts":"2023-09-27T21:14:42Z","logger":"statusUpdater","msg":"Skipping updating Gateway API status because not leader"}
{"level":"info","ts":"2023-09-27T21:14:42Z","logger":"statusUpdater","msg":"Skipping updating Nginx Gateway status because not leader"}
I0927 21:15:04.509435       7 leaderelection.go:260] successfully acquired lease nginx-gateway/nginx-gateway-leader-election
{"level":"info","ts":"2023-09-27T21:15:04Z","logger":"leaderElector","msg":"Started leading"}

where some lines are text klog logs, others - structured NGF logs

Acceptance criteria:

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions