fixup logger usage (#33)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-09-05 02:43:16 +03:00
committed by GitHub
parent c576749b57
commit e7d418183b
8 changed files with 53 additions and 41 deletions

View File

@@ -54,7 +54,9 @@ func (r *Resolver) Domain(req *http.Request) string {
// extract the top level domain plus one (e.g. 'myapp.com')
domain, err := publicsuffix.EffectiveTLDPlusOne(host)
if err != nil {
logger.Debugf("Unable to extract domain from %v", host)
if logger.V(logger.DebugLevel) {
logger.Debugf("Unable to extract domain from %v", host)
}
return ""
}