From a4bda7e7d5eaba498c6ca89473054eca647b3d08 Mon Sep 17 00:00:00 2001 From: caojiajun Date: Mon, 13 Feb 2023 14:40:43 +0800 Subject: [PATCH] update log for UpstreamRedisClientTemplateFactory --- .../proxy/upstream/UpstreamRedisClientTemplateFactory.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/camellia-redis-proxy/camellia-redis-proxy-core/src/main/java/com/netease/nim/camellia/redis/proxy/upstream/UpstreamRedisClientTemplateFactory.java b/camellia-redis-proxy/camellia-redis-proxy-core/src/main/java/com/netease/nim/camellia/redis/proxy/upstream/UpstreamRedisClientTemplateFactory.java index b9c2a7394..3babdb897 100644 --- a/camellia-redis-proxy/camellia-redis-proxy-core/src/main/java/com/netease/nim/camellia/redis/proxy/upstream/UpstreamRedisClientTemplateFactory.java +++ b/camellia-redis-proxy/camellia-redis-proxy-core/src/main/java/com/netease/nim/camellia/redis/proxy/upstream/UpstreamRedisClientTemplateFactory.java @@ -237,6 +237,7 @@ private void initCustom() { private UpstreamRedisClientTemplate initCustomInstance(long bid, String bgroup) { CamelliaTranspondProperties.CustomProperties custom = properties.getCustom(); if (custom == null) return null; + logger.info("UpstreamRedisClientTemplate init, bid = {}, bgroup = {}", bid, bgroup); UpstreamRedisClientTemplate template = new UpstreamRedisClientTemplate(env, bid, bgroup, updater, custom.getReloadIntervalMillis()); //更新的callback ResourceTableUpdateCallback updateCallback = template::update; @@ -259,7 +260,6 @@ private UpstreamRedisClientTemplate initCustomInstance(long bid, String bgroup) }; //添加callback updater.addCallback(bid, bgroup, updateCallback, removeCallback); - logger.info("UpstreamRedisClientTemplate init, bid = {}, bgroup = {}", bid, bgroup); return template; } @@ -269,9 +269,8 @@ private UpstreamRedisClientTemplate initRemoteInstance(long bid, String bgroup) if (remote == null) return null; boolean monitorEnable = remote.isMonitorEnable(); long checkIntervalMillis = remote.getCheckIntervalMillis(); - UpstreamRedisClientTemplate template = new UpstreamRedisClientTemplate(env, apiService, bid, bgroup, monitorEnable, checkIntervalMillis); logger.info("UpstreamRedisClientTemplate init, bid = {}, bgroup = {}", bid, bgroup); - return template; + return new UpstreamRedisClientTemplate(env, apiService, bid, bgroup, monitorEnable, checkIntervalMillis); } private void initEnv() {