1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-29 01:00:00 -04:00

refactor log and error

This commit is contained in:
Darien Raymond
2017-04-06 21:13:17 +02:00
parent fc31f9b94c
commit 75f5cb9afb
33 changed files with 123 additions and 99 deletions

View File

@@ -4,6 +4,7 @@ import (
"net"
"v2ray.com/core/app/log"
"v2ray.com/core/common/errors"
)
func (v *Config) GetInternalHosts() map[string]net.IP {
@@ -11,7 +12,7 @@ func (v *Config) GetInternalHosts() map[string]net.IP {
for domain, ipOrDomain := range v.GetHosts() {
address := ipOrDomain.AsAddress()
if address.Family().IsDomain() {
log.Warning("DNS: Ignoring domain address in static hosts: ", address.Domain())
log.Trace(errors.New("DNS: Ignoring domain address in static hosts: ", address.Domain()).AtWarning())
continue
}
hosts[domain] = address.IP()