Skip to content

Commit 220b19c

Browse files
committed
Merge branch 'feat_logLevel_mergeDev' into 'v1.8.0_dev'
Feat log level merge dev See merge request !275
2 parents c04f9f2 + 3c6532f commit 220b19c

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ sh submit.sh -sql D:\sideSql.txt -name xctest -remoteSqlPluginPath /opt/dtstack
152152
* restore.enable:是否失败重启(默认是true)
153153
* failure.interval:衡量失败率的时间段,单位分钟(默认6m)
154154
* delay.interval:连续两次重启尝试间的间隔,单位是秒(默认10s)
155+
* logLevel: 日志级别动态配置(默认info)
155156
* [prometheus 相关参数](docs/prometheus.md) per_job可指定metric写入到外部监控组件,以prometheus pushgateway举例
156157

157158

@@ -185,10 +186,6 @@ sh submit.sh -sql D:\sideSql.txt -name xctest -remoteSqlPluginPath /opt/dtstack
185186
* 必选:否
186187
* 默认值:false
187188

188-
* **logLevel**
189-
* 描述:设定日志级别
190-
* 必选:否
191-
* 默认值:info
192189

193190
## 2 结构
194191
### 2.1 源表插件

core/src/main/java/com/dtstack/flink/sql/constrant/ConfigConstrant.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ public class ConfigConstrant {
6565

6666
public static final String RESTOREENABLE = "restore.enable";
6767

68+
public static final String LOG_LEVEL_KEY = "logLevel";
69+
6870

6971
// restart plocy
7072
public static final int failureRate = 3;

launcher/src/main/java/com/dtstack/flink/sql/launcher/LauncherMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static void main(String[] args) throws Exception {
8484
confProp = URLDecoder.decode(confProp, Charsets.UTF_8.toString());
8585
Properties confProperties = PluginUtil.jsonStrToObject(confProp, Properties.class);
8686

87-
setLogLevel(launcherOptions.getLogLevel());
87+
setLogLevel(confProperties.getProperty(ConfigConstrant.LOG_LEVEL_KEY));
8888

8989
if(mode.equals(ClusterMode.local.name())) {
9090
String[] localArgs = argList.toArray(new String[argList.size()]);

0 commit comments

Comments
 (0)