Browse Source

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

weicky 2 years ago
parent
commit
cb1c52ec94
1 changed files with 1 additions and 1 deletions
  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
 			//已用内存