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

feat: support customized logger for Boomer, Output and runner #194

Merged
merged 6 commits into from
Oct 12, 2023

Conversation

zezhehh
Copy link
Contributor

@zezhehh zezhehh commented Oct 11, 2023

The new feature is totally backwards compatible, while it allows user to customize the logger for Boomer, Output and runner.

Added:

  • func (b *Boomer) WithLogger(logger *log.Logger) *Boomer
  • func (o *XxxOutput) WithLogger(logger *log.Logger) *XxxOutput

@zezhehh zezhehh changed the title feat: support customized logger for boomer and runner feat: support customized logger for boomer, output and runner Oct 11, 2023
@zezhehh zezhehh changed the title feat: support customized logger for boomer, output and runner feat: support customized logger for Boomer, Output and runner Oct 11, 2023
@zezhehh zezhehh marked this pull request as draft October 11, 2023 16:11
@zezhehh zezhehh marked this pull request as ready for review October 11, 2023 16:23
@myzhan
Copy link
Owner

myzhan commented Oct 12, 2023

Please make sure the tests are passed.

@zezhehh
Copy link
Contributor Author

zezhehh commented Oct 12, 2023

Please make sure the tests are passed.

@myzhan Could you approve the workflow again? Local tests work now with default loggers added.

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2023

Codecov Report

Merging #194 (0ca5b34) into master (f08c0e5) will increase coverage by 0.67%.
The diff coverage is 81.03%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master     #194      +/-   ##
==========================================
+ Coverage   80.60%   81.28%   +0.67%     
==========================================
  Files          10       10              
  Lines        1542     1576      +34     
==========================================
+ Hits         1243     1281      +38     
+ Misses        248      244       -4     
  Partials       51       51              
Flag Coverage Δ
unittests 81.28% <81.03%> (+0.67%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
boomer.go 79.47% <86.95%> (+1.88%) ⬆️
output.go 60.00% <80.00%> (+4.68%) ⬆️
runner.go 82.85% <73.33%> (+0.24%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zezhehh
Copy link
Contributor Author

zezhehh commented Oct 12, 2023

hmmmm, I have no idea why the windows one failed, but I can add tests for WithLogger, which probably increases the coverage. Should I?

@myzhan
Copy link
Owner

myzhan commented Oct 12, 2023

hmmmm, I have no idea why the windows one failed, but I can add tests for WithLogger, which probably increases the coverage. Should I?

I think the windows machine make some time-sensitive testcases flaky, your changes are not related. Yes, you can add testcases for WithLogger.

@zezhehh
Copy link
Contributor Author

zezhehh commented Oct 12, 2023

hmmmm, I have no idea why the windows one failed, but I can add tests for WithLogger, which probably increases the coverage. Should I?

I think the windows machine make some time-sensitive testcases flaky, your changes are not related. Yes, you can add testcases for WithLogger.

@myzhan Hopefully it's green for Codecov this time.

@zezhehh
Copy link
Contributor Author

zezhehh commented Oct 12, 2023

Let's go ahead and merge it! If it works for you @myzhan :D

@myzhan myzhan merged commit 13a33ca into myzhan:master Oct 12, 2023
3 checks passed
@myzhan
Copy link
Owner

myzhan commented Oct 12, 2023

Done, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants