diff --git a/hosts_file.go b/hosts_file.go index 985bd42..31f9e42 100644 --- a/hosts_file.go +++ b/hosts_file.go @@ -45,6 +45,8 @@ func NewFileProvider(file string) HostProvider { } func (f *FileHosts) Get(domain string) ([]string, bool) { + logger.Debug("Checking file provider for %s", domain) + f.mu.RLock() defer f.mu.RUnlock() domain = strings.ToLower(domain) diff --git a/hosts_redis.go b/hosts_redis.go index 09edae9..f752279 100644 --- a/hosts_redis.go +++ b/hosts_redis.go @@ -65,6 +65,8 @@ func NewRedisProvider(rc *redis.Client, key string) HostProvider { } func (r *RedisHosts) Get(domain string) ([]string, bool) { + logger.Debug("Checking redis provider for %s", domain) + r.mu.RLock() defer r.mu.RUnlock()