Skip to content

Commit 52e5d1d

Browse files
author
dapeng
committed
Merge branch 'feat_logLevel_mergeTest' into '1.8_test_3.10.x'
Feat log level merge test See merge request !277
2 parents fb5ed33 + af84799 commit 52e5d1d

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
@@ -149,6 +149,7 @@ sh submit.sh -sql D:\sideSql.txt -name xctest -remoteSqlPluginPath /opt/dtstack
149149
* taskmanager.slots:per_job模式下指定每个taskmanager对应的slot数量(默认1)
150150
* savePointPath:任务恢复点的路径(默认无)
151151
* allowNonRestoredState:指示保存点是否允许非还原状态的标志(默认false)
152+
* logLevel: 日志级别动态配置(默认info)
152153
* [prometheus 相关参数](docs/prometheus.md) per_job可指定metric写入到外部监控组件,以prometheus pushgateway举例
153154

154155

@@ -182,10 +183,6 @@ sh submit.sh -sql D:\sideSql.txt -name xctest -remoteSqlPluginPath /opt/dtstack
182183
* 必选:否
183184
* 默认值:false
184185

185-
* **logLevel**
186-
* 描述:设定日志级别
187-
* 必选:否
188-
* 默认值:info
189186

190187
## 2 结构
191188
### 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
@@ -63,6 +63,8 @@ public class ConfigConstrant {
6363
public static final String CHECKPOINTS_DIRECTORY_KEY = "state.checkpoints.dir";
6464
public static final String STATE_BACKEND_INCREMENTAL_KEY = "state.backend.incremental";
6565

66+
public static final String LOG_LEVEL_KEY = "logLevel";
67+
6668

6769
// restart plocy
6870
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)