Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix log level and add some log #42

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected void validate() {
@Override
public void register() {
super.register();
logger.info("start to register local file as sentinel flow rule data source, path = {}", path);
AbstractDataSource<String, List<FlowRule>> dataSource = null;
Converter<String, List<FlowRule>> converter = source -> JsonUtils.fromJson(source,
new TypeReference<List<FlowRule>>() {
Expand Down Expand Up @@ -100,7 +101,7 @@ public void register() {
throw new LimiterDataSourceException("file path=" + path + " not exists");
}
FlowRuleManager.register2Property(dataSource.getProperty());
logger.warn("succeed to register local file as sentinel flow rule data source");
logger.info("succeed to register local file as sentinel flow rule data source");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ protected void validate() {
@Override
public void register() {
super.register();
logger.warn("start to register nacos as sentinel flow rule data source, remoteAddress = {}, groupId = {},"
logger.info("start to register nacos as sentinel flow rule data source, remoteAddress = {}, groupId = {},"
+ " dataId= {}", remoteAddress, groupId, dataId);
ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new NacosDataSource<>(remoteAddress, groupId,
dataId, source -> JsonUtils.fromJson(source, new TypeReference<List<FlowRule>>() {
}));
FlowRuleManager.register2Property(flowRuleDataSource.getProperty());
logger.warn("succeed to register nacos as sentinel flow rule datasource");
logger.info("succeed to register nacos as sentinel flow rule datasource");
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Tencent is pleased to support the open source community by making tRPC available.
*
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* If you have downloaded a copy of the tRPC source code from Tencent,
Expand Down Expand Up @@ -67,10 +67,13 @@ protected void validate() {
@Override
public void register() {
super.register();
logger.info("start to register redis as sentinel flow rule data source, channel = {}, ruleKey = {}", channel,
ruleKey);
ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new RedisDataSource<>(redisConnectionConfig,
ruleKey, channel, source -> JsonUtils.fromJson(source, new TypeReference<List<FlowRule>>() {
}));
FlowRuleManager.register2Property(flowRuleDataSource.getProperty());
logger.info("succeed to register redis as sentinel flow rule datasource");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ protected void validate() {
@Override
public void register() {
super.register();
logger.warn("start to register zookeeper as sentinel flow rule data source, remoteAddress = {}, path = {}",
logger.info("start to register zookeeper as sentinel flow rule data source, remoteAddress = {}, path = {}",
remoteAddress, path);
ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ZookeeperDataSource<>(remoteAddress, path,
source -> JsonUtils.fromJson(source, new TypeReference<List<FlowRule>>() {
}));
FlowRuleManager.register2Property(flowRuleDataSource.getProperty());
logger.warn("succeed to register zookeeper as sentinel flow rule datasource");
logger.info("succeed to register zookeeper as sentinel flow rule datasource");
}

}
Loading