Finschia / ostracon

Ostracon, a consensus algorithm, is forked from Tendermint Core. We have added VRF to Tendermint BFT. It adds randomness to PoS Validator elections and improves security.
Apache License 2.0
70 stars 28 forks source link

feat: zerolog based rolling log system #535

Closed dudong2 closed 1 year ago

dudong2 commented 1 year ago

Description

Currently, log level setting by module and rotation log system are not available in lbm-sdk's log system. In order to support these functions, a zerolog-based extended log system is implemented.

Closes: #825

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 1 year ago

Codecov Report

Merging #535 (4f0af64) into main (e8f0b19) will increase coverage by 0.11%. The diff coverage is 82.55%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #535 +/- ## ========================================== + Coverage 66.03% 66.14% +0.11% ========================================== Files 279 280 +1 Lines 38045 38119 +74 ========================================== + Hits 25122 25213 +91 + Misses 11123 11107 -16 + Partials 1800 1799 -1 ``` | [Impacted Files](https://codecov.io/gh/line/ostracon/pull/535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line) | Coverage Δ | | |---|---|---| | [config/toml.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-Y29uZmlnL3RvbWwuZ28=) | `74.19% <ø> (ø)` | | | [libs/log/zerolog\_logger.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-bGlicy9sb2cvemVyb2xvZ19sb2dnZXIuZ28=) | `77.94% <77.94%> (ø)` | | | [cmd/ostracon/commands/root.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-Y21kL29zdHJhY29uL2NvbW1hbmRzL3Jvb3QuZ28=) | `37.50% <100.00%> (ø)` | | | [config/config.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-Y29uZmlnL2NvbmZpZy5nbw==) | `78.36% <100.00%> (+0.26%)` | :arrow_up: | | [libs/log/log\_level.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-bGlicy9sb2cvbG9nX2xldmVsLmdv) | `84.21% <100.00%> (ø)` | | | [abci/client/socket\_client.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-YWJjaS9jbGllbnQvc29ja2V0X2NsaWVudC5nbw==) | `72.09% <0.00%> (-0.88%)` | :arrow_down: | | [p2p/pex/addrbook.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-cDJwL3BleC9hZGRyYm9vay5nbw==) | `71.06% <0.00%> (-0.51%)` | :arrow_down: | | [consensus/reactor.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-Y29uc2Vuc3VzL3JlYWN0b3IuZ28=) | `74.75% <0.00%> (-0.36%)` | :arrow_down: | | [proxy/multi\_app\_conn.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-cHJveHkvbXVsdGlfYXBwX2Nvbm4uZ28=) | `47.66% <0.00%> (ø)` | | | [blockchain/v0/pool.go](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line#diff-YmxvY2tjaGFpbi92MC9wb29sLmdv) | `79.06% <0.00%> (+0.25%)` | :arrow_up: | | ... and [5 more](https://codecov.io/gh/line/ostracon/pull/535/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=line) | |
kokeshiM0chi commented 1 year ago

Thanks for the PR. e2e and r2ishiguro require several tests to succeed, so please retry. @dudong2

dudong2 commented 1 year ago

Thanks for the PR. e2e and r2ishiguro require several tests to succeed, so please retry. @dudong2

After 7 retries, it passed. The e2e-test has a very frequent failure rate. There were no cases of failure on my local. Do you know why there are so many failures? If it is opened to external developers in the future, is there any plan to revise this test?

tnasu commented 1 year ago

After 7 retries, it passed. The e2e-test has a very frequent failure rate. There were no cases of failure on my local. Do you know why there are so many failures? If it is opened to external developers in the future, is there any plan to revise this test?

This PR reduced the failure rate. Thanks