Explorar o código

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

weicky %!s(int64=2) %!d(string=hai) anos
pai
achega
cb1c52ec94
Modificáronse 1 ficheiros con 1 adicións e 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
 			//已用内存