Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: etcd config the default zap.Logger #3244

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pashifika
Copy link

@pashifika pashifika commented May 12, 2023

	// init logger
	writer := zapx.NewZapWriter(c.LogZapx)
	logx.SetWriter(writer)
	logx.DefaultZapLogger = &clientv3.Config{
		Logger: writer.Logger(),
	}

must be initialized before zrpc.MustNewServer

@kevwan
Copy link
Contributor

kevwan commented May 12, 2023

Don't import zap as a dependency.

@pashifika
Copy link
Author

@kevwan
go.uber.org/zap v1.24.0 // indirect
It has been imported

@kevwan
Copy link
Contributor

kevwan commented May 12, 2023

No direct import.

You can submit PR to get it done here: https://github.com/zeromicro/zero-contrib/tree/main/logx/zapx

@pashifika
Copy link
Author

pashifika commented May 12, 2023

No direct import.

@kevwan fix done.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #3244 (747f21d) into master (0c6eaed) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted Files Coverage Δ
core/discov/internal/registry.go 79.21% <0.00%> (-0.95%) ⬇️

@kevwan
Copy link
Contributor

kevwan commented Jul 13, 2023

I think it's not a good idea to config zap in logx.

@kevwan kevwan added do-not-merge/hold Indicates that a PR should not merge because of known issues or need more discussion. area/logs Categorizes issue or PR as related to logs. labels Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logs Categorizes issue or PR as related to logs. do-not-merge/hold Indicates that a PR should not merge because of known issues or need more discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants