小调整

pull/430/head
王良 2025-01-09 17:27:19 +08:00
parent 537be72e30
commit a4ecd7aa24
2 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ function connect (req, cltSocket, head, hostname, port, dnsConfig = null, isDire
log.error(`cltSocket error: ${connectInfo}, errorMsg: ${e.message}`)
})
// 开发过程中如有需要可以将此参数临时改为true打印所有事件的日志
const printDebugLog = false && process.env.NODE_ENV === 'development'
const printDebugLog = process.env.NODE_ENV === 'development' && false
if (printDebugLog) {
cltSocket.on('close', (hadError) => {
log.debug('【cltSocket close】', hadError)
@ -88,7 +88,7 @@ function connect (req, cltSocket, head, hostname, port, dnsConfig = null, isDire
cltSocket.on('connectionAttemptTimeout', (ip, port, family) => {
log.debug(`【cltSocket connectionAttemptTimeout】${ip}:${port}: ${connectInfo}, family:`, family)
})
cltSocket.on('data', (data) => {
cltSocket.on('data', (_data) => {
log.debug(`【cltSocket data】${connectInfo}`)
})
cltSocket.on('drain', () => {
@ -177,7 +177,7 @@ function connect (req, cltSocket, head, hostname, port, dnsConfig = null, isDire
proxySocket.on('connectionAttemptTimeout', (ip, port, family) => {
log.debug(`【proxySocket connectionAttemptTimeout】${ip}:${port}, family:`, family)
})
proxySocket.on('data', (data) => {
proxySocket.on('data', (_data) => {
log.debug('【proxySocket data】')
})
proxySocket.on('drain', () => {

View File

@ -83,7 +83,7 @@ module.exports = {
)
// 创建监听方法,用于监听 http 和 https 两个端口
const printDebugLog = false && process.env.NODE_ENV === 'development' // 开发过程中如有需要可以将此参数临时改为true打印所有事件的日志
const printDebugLog = process.env.NODE_ENV === 'development' && false // 开发过程中如有需要可以将此参数临时改为true打印所有事件的日志
const serverListen = (server, ssl, port, host) => {
server.listen(port, host, () => {
log.info(`dev-sidecar启动 ${ssl ? 'https' : 'http'} 端口: ${host}:${port}`)