redis / lettuce

Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
https://lettuce.io
MIT License
5.3k stars 947 forks source link

After turning on topology refresh, lettuce log is written inside rocketmq-client.log. #2847

Closed FrankCy closed 1 month ago

FrankCy commented 1 month ago

Bug Report

There is the following log in rocketmq-client.log: 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] channelActive() 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] channelActive() 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] channelActive() 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] channelActive() 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] channelActive() 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] channelActive() 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1358e27d) 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1358e27d) 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1358e27d) 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1358e27d) 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1358e27d) 2024-05-06 16:25:23,023 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0xe7773456, /10.8.0.27:57227 -> 172.17.48.140/172.17.48.140:6379, last known addr=172.17.48.140/172.17.48.140:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1358e27d) 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.cluster.PooledClusterConnectionProvider$DefaultClusterNodeConnectionFactory - Resolved SocketAddress 172.17.48.40:6379 using for Cluster node at 172.17.48.40:6379 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.cluster.PooledClusterConnectionProvider$DefaultClusterNodeConnectionFactory - Resolved SocketAddress 172.17.48.40:6379 using for Cluster node at 172.17.48.40:6379 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.cluster.PooledClusterConnectionProvider$DefaultClusterNodeConnectionFactory - Resolved SocketAddress 172.17.48.40:6379 using for Cluster node at 172.17.48.40:6379 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0x504f668d, /10.8.0.27:57228 -> 172.17.48.40/172.17.48.40:6379, last known addr=172.17.48.40/172.17.48.40:6379] channelActive() 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0x504f668d, /10.8.0.27:57228 -> 172.17.48.40/172.17.48.40:6379, last known addr=172.17.48.40/172.17.48.40:6379] channelActive() 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0x504f668d, /10.8.0.27:57228 -> 172.17.48.40/172.17.48.40:6379, last known addr=172.17.48.40/172.17.48.40:6379] channelActive() 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0x504f668d, /10.8.0.27:57228 -> 172.17.48.40/172.17.48.40:6379, last known addr=172.17.48.40/172.17.48.40:6379] channelActive() 2024-05-06 16:25:24,024 DEBUG io.lettuce.core.protocol.ConnectionWatchdog - [channel=0x504f668d, /10.8.0.27:57228 -> 172.17.48.40/172.17.48.40:6379, last known addr=172.17.48.40/172.17.48.40:6379] channelActive()

Current Behavior

This is an application that has rocketmq and uses redis at the same time. Normally rocketmq-console.log shouldn't print the contents of lettuce because it's two different components.

Environment

FrankCy commented 1 month ago

help

FrankCy commented 1 month ago

Can you help clarify how the io.lettuce.core.protocol.ConnectionWatchdog logs set the output location?

FrankCy commented 1 month ago

Hi, is it possible to give an example of how to set the log output level and location of a directory specified by lettuce when starting a java program. Without having to set it via logback.xml as my application uses log4j2.xml

tishun commented 1 month ago

Hey @FrankCy ,

this looks to me like a question on how to configure the logger of your application and this is perhaps more suited for a question in Stackoverflow. The audience there is larger and also other folks could use the reply to solve their problems.