日志调整。

pull/292/head
王良 2024-04-10 17:17:38 +08:00
parent d7751144bf
commit 34211d062c
2 changed files with 3 additions and 4 deletions

View File

@ -58,8 +58,7 @@ module.exports = class BaseDNS {
ipList.push(hostname) // 把原域名加入到统计里去
ipCache.setBackupList(ipList)
log.info(`[dns counter]:${hostname}`, ipCache.value, ipList, JSON.stringify(ipCache))
log.info(`[DNS] ${hostname} -> ${ipCache.value} (${new Date() - t} ms)`)
log.info(`[DNS]: ${hostname}${ipCache.value} (${new Date() - t} ms), ipList: ${JSON.stringify(ipList)}, ipCache:`, JSON.stringify(ipCache))
return ipCache.value
} catch (error) {

View File

@ -25,8 +25,8 @@ module.exports = class DNSOverHTTPS extends BaseDNS {
log.info('获取到域名地址:', hostname, JSON.stringify(ret))
}
return ret
} catch (err) {
log.info('dns query error', hostname, this.dnsServer, err.message)
} catch (e) {
log.warn('DNS query error:', hostname, ', dns:', this.dnsServer, ', error:', e)
return []
}
}