vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
799 stars 248 forks source link

Darren/enhancement/use slog #781

Closed darrenvechain closed 1 month ago

darrenvechain commented 1 month ago

Description

Use the built in slog package. log package copied from latest geth. Also introduced a new flag --json-logs which will output the logs in JSON format.

Type of change

How Has This Been Tested?

Checklist:

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 37.57962% with 392 lines in your changes missing coverage. Please review.

Project coverage is 62.14%. Comparing base (830b1a6) to head (117922f). Report is 2 commits behind head on master.

Files Patch % Lines
log/format.go 62.89% 67 Missing and 15 partials :warning:
log/logger.go 26.43% 62 Missing and 2 partials :warning:
log/handler.go 48.93% 46 Missing and 2 partials :warning:
log/root.go 4.08% 47 Missing :warning:
cmd/thor/utils.go 0.00% 35 Missing :warning:
cmd/disco/utils.go 0.00% 26 Missing :warning:
cmd/thor/node/node.go 0.00% 26 Missing :warning:
cmd/thor/main.go 0.00% 21 Missing :warning:
cmd/thor/node/packer_loop.go 0.00% 12 Missing :warning:
p2psrv/server.go 0.00% 7 Missing :warning:
... and 11 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #781 +/- ## ========================================== - Coverage 62.59% 62.14% -0.46% ========================================== Files 199 203 +4 Lines 18165 18688 +523 ========================================== + Hits 11371 11613 +242 - Misses 5713 5974 +261 - Partials 1081 1101 +20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.