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

cmd: add init logger in printFlags #1277

Merged
merged 3 commits into from
Oct 13, 2022
Merged

cmd: add init logger in printFlags #1277

merged 3 commits into from
Oct 13, 2022

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Oct 13, 2022

Inits logging as soon as log flags are parsed in printFlags function.

category: bug
ticket: #1272

logLevel := flags.Lookup("log-level")
logFmt := flags.Lookup("log-format")

if logLevel != nil && logFmt != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best not do two things at once, call this manually before printFlags

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Base: 53.41% // Head: 53.80% // Increases project coverage by +0.38% 🎉

Coverage data is based on head (d6f9e06) compared to base (9ebcc6b).
Patch coverage: 45.45% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1277      +/-   ##
==========================================
+ Coverage   53.41%   53.80%   +0.38%     
==========================================
  Files         139      139              
  Lines       16356    16457     +101     
==========================================
+ Hits         8737     8855     +118     
+ Misses       6362     6340      -22     
- Partials     1257     1262       +5     
Impacted Files Coverage Δ
app/app.go 59.70% <ø> (+0.46%) ⬆️
cmd/bootnode.go 32.21% <0.00%> (+0.21%) ⬆️
cmd/dkg.go 7.14% <0.00%> (-0.55%) ⬇️
cmd/run.go 93.81% <0.00%> (-3.03%) ⬇️
dkg/dkg.go 49.88% <ø> (+0.34%) ⬆️
cmd/cmd.go 77.77% <76.92%> (-0.13%) ⬇️
core/priority/calculate.go 68.34% <0.00%> (-2.77%) ⬇️
core/dutydb/memory.go 66.38% <0.00%> (-0.85%) ⬇️
app/vmock.go 71.89% <0.00%> (-0.66%) ⬇️
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 13, 2022
@dB2510 dB2510 linked an issue Oct 13, 2022 that may be closed by this pull request
@obol-bulldozer obol-bulldozer bot merged commit bffcbb5 into main Oct 13, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/initlogger branch October 13, 2022 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log format not applied to all logs
2 participants