Allow overriding the Logger used by Proxy#174
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #174 +/- ##
=========================================
+ Coverage 84.48% 84.8% +0.31%
=========================================
Files 5 5
Lines 490 500 +10
=========================================
+ Hits 414 424 +10
Misses 56 56
Partials 20 20
Continue to review full report at Codecov.
|
|
Looks great! Thanks @hmhealey |
Related to #162, I'd like a bit more control over the image proxy's log output so that we can route it through the same logging interface that's used by the rest of our server. That's not currently possible because the
Proxyuses the globallog.Loggerinstance, but it's easy enough to get this functionality by giving theProxyit's ownlog.Loggerinstance. By default, it creates its own instance that matches the one in thelogpackage. I'm hoping that this could be useful to others.There's a few places where the global logger is still used, but that's inside functions that aren't part of the
Proxyand in thehttpservice.Cacheimplementations, so changing those would be more intrusive.