Explorar el Código

修复一处写日志会导致的crash问题

weicky hace 2 años
padre
commit
cb1c52ec94
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      redis_monitor.go

+ 1 - 1
redis_monitor.go

@@ -85,7 +85,7 @@ func (m *RedisMonitor) loopStep() {
 				})
 			}
 			//记录日志
-			SYSLOG("WARN", fmt.Sprintf("Redis#%d[%s]状态查询失败:%s,连接第%d次", row.Id, row.Address, err.Error(), m.logs[row.Id].FailedCount))
+			SYSLOG("WARN", fmt.Sprintf("Redis#%d[%s]状态查询失败:%s,连接第%d次", row.Id, row.Address, info.Error, m.logs[row.Id].FailedCount))
 		} else {
 			var usedMemory, maxMemory, systemMemory, connections, qps, evictedKeys, eviIncreased int
 			//已用内存