日志格式小调整。
parent
3e6eef757c
commit
c5d123ed24
|
@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue