From 90407628e08d0aeaa9910b33294de5c7d6c605fb Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 5 Aug 2018 00:16:15 -0400 Subject: [PATCH] Add debugging --- hosts_file.go | 2 ++ hosts_redis.go | 2 ++ 2 files changed, 4 insertions(+) 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()