这是indexloc提供的服务,不要输入任何密码
Skip to content

avoid using zap.NewNop() logger #344

@SebastianElvis

Description

@SebastianElvis

non-op logger is extremely hard to debug issue. it caused us a few hours to find out why our op e2e test failed with no error

we are now changing it to

	loggerConfig := zap.NewDevelopmentConfig()
	loggerConfig.Level = zap.NewAtomicLevelAt(zap.ErrorLevel)
	logger, err := loggerConfig.Build()

and now able to see the error

2024-06-29T18:05:59.836743Z	fatal	terminating the finality-provider instance due to critical error	{"pk": "97276691ab7632441c0d1134d50757387384e382bb2e6e136ec0cfa434e903b7", "error": "reached max failed cycles with err: failed to get inclusion proof of public randomness: public randomness proof not found"}
FAIL	github.com/babylonchain/finality-provider/itest/opstackl2	58.770s
FAIL
make: *** [test-e2e-op] Error 1

we fixed it in our test but by quickly searching the codebase, we found many other places are using it.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions