日志格式小调整。

pull/333/head
王良 2024-08-16 13:18:38 +08:00
parent 3e6eef757c
commit c5d123ed24
1 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e
if (tester) { if (tester) {
const ip = tester.pickFastAliveIp() const ip = tester.pickFastAliveIp()
if (ip) { if (ip) {
log.info(`-----${hostname} use alive ip:${ip}-----`) log.info(`----- hostname: ${hostname}, use alive ip: ${ip} -----`)
callback(null, ip, 4) callback(null, ip, 4)
return return
} }
@ -128,10 +128,10 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e
dns.lookup(hostname).then(ip => { dns.lookup(hostname).then(ip => {
isDnsIntercept = { dns, hostname, ip } isDnsIntercept = { dns, hostname, ip }
if (ip !== hostname) { if (ip !== hostname) {
log.info(`----request url :${url},use ip :${ip}----`) log.info(`---- request url: ${url}, use ip: ${ip} ----`)
callback(null, ip, 4) callback(null, ip, 4)
} else { } else {
log.info(`request url :${url},use hostname :${hostname}`) log.info(`---- request url: ${url}, use hostname: ${hostname} ----`)
defaultDns.lookup(hostname, options, callback) defaultDns.lookup(hostname, options, callback)
} }
}) })