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

Expose configuration of logger #362

Merged
merged 1 commit into from Oct 22, 2021

Conversation

rcrowe
Copy link
Contributor

@rcrowe rcrowe commented Oct 4, 2021

Allow the log instance to be configured independently from other uses of the log package.

testcontainers.Logger.SetPrefix("[some-prefix] ")
testcontainers.Logger.SetOutput(io.Discard)

This is still global & it would be better to be able to pass in an instance of *log.Logger but that can be a follow-up PR. I wanted to land something small & hopefully non-contentious.

@mdelapenya
Copy link
Collaborator

mdelapenya commented Oct 5, 2021

Thanks for the contribution! I agree that having a setter/configuration option for the log would be better, so feel free to send it in a follow up PR or even saying more commits on top, whatever you prefer

@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #362 (cceef31) into master (a8ca295) will not change coverage.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #362   +/-   ##
=======================================
  Coverage   61.91%   61.91%           
=======================================
  Files          15       15           
  Lines        1011     1011           
=======================================
  Hits          626      626           
  Misses        288      288           
  Partials       97       97           
Impacted Files Coverage Δ
container.go 85.29% <ø> (ø)
docker.go 64.71% <75.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5a9803...cceef31. Read the comment docs.

@gianarb
Copy link
Collaborator

gianarb commented Oct 22, 2021

Great start! Thanks

@gianarb gianarb merged commit efe05c4 into testcontainers:master Oct 22, 2021
@gianarb gianarb added the feature New functionality or new behaviors on the existing one label Oct 22, 2021
@rcrowe rcrowe deleted the configure-logger branch October 31, 2021 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants