Skip to content

Commit dff67ab

Browse files
committed
remove log level
1 parent 7e12bc4 commit dff67ab

File tree

3 files changed

+2
-31
lines changed

3 files changed

+2
-31
lines changed

core/src/main/java/com/dtstack/flink/sql/exec/ExecuteProcessHelper.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public static ParamsInfo parseParams(String[] args) throws Exception {
110110
String remoteSqlPluginPath = options.getRemoteSqlPluginPath();
111111
String pluginLoadMode = options.getPluginLoadMode();
112112
String deployMode = options.getMode();
113-
String logLevel = options.getLogLevel();
114113

115114
Preconditions.checkArgument(checkRemoteSqlPluginPath(remoteSqlPluginPath, deployMode, pluginLoadMode),
116115
"Non-local mode or shipfile deployment mode, remoteSqlPluginPath is required");
@@ -128,7 +127,6 @@ public static ParamsInfo parseParams(String[] args) throws Exception {
128127
.setDeployMode(deployMode)
129128
.setConfProp(confProperties)
130129
.setJarUrlList(jarURList)
131-
.setLogLevel(logLevel)
132130
.build();
133131

134132
}
@@ -154,8 +152,6 @@ public static StreamExecutionEnvironment getStreamExecution(ParamsInfo paramsInf
154152
StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
155153
StreamQueryConfig streamQueryConfig = StreamEnvConfigManager.getStreamQueryConfig(tableEnv, paramsInfo.getConfProp());
156154

157-
setLogLevel(paramsInfo.getLogLevel());
158-
159155
SqlParser.setLocalSqlPluginRoot(paramsInfo.getLocalSqlPluginPath());
160156
SqlTree sqlTree = SqlParser.parseSql(paramsInfo.getSql());
161157

@@ -348,11 +344,5 @@ public static StreamExecutionEnvironment getStreamExeEnv(Properties confProperti
348344
return env;
349345
}
350346

351-
private static void setLogLevel(String level){
352-
LoggerContext loggerContext= (LoggerContext) LoggerFactory.getILoggerFactory();
353-
//设置全局日志级别
354-
ch.qos.logback.classic.Logger logger = loggerContext.getLogger("root");
355-
logger.setLevel(Level.toLevel(level, Level.INFO));
356-
}
357347

358348
}

core/src/main/java/com/dtstack/flink/sql/exec/ParamsInfo.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,17 @@ public class ParamsInfo {
3838
private String remoteSqlPluginPath;
3939
private String pluginLoadMode;
4040
private String deployMode;
41-
private String logLevel;
4241
private Properties confProp;
4342

4443
public ParamsInfo(String sql, String name, List<URL> jarUrlList, String localSqlPluginPath,
45-
String remoteSqlPluginPath, String pluginLoadMode, String deployMode, String logLevel, Properties confProp) {
44+
String remoteSqlPluginPath, String pluginLoadMode, String deployMode, Properties confProp) {
4645
this.sql = sql;
4746
this.name = name;
4847
this.jarUrlList = jarUrlList;
4948
this.localSqlPluginPath = localSqlPluginPath;
5049
this.remoteSqlPluginPath = remoteSqlPluginPath;
5150
this.pluginLoadMode = pluginLoadMode;
5251
this.deployMode = deployMode;
53-
this.logLevel = logLevel;
5452
this.confProp = confProp;
5553
}
5654

@@ -86,9 +84,6 @@ public Properties getConfProp() {
8684
return confProp;
8785
}
8886

89-
public String getLogLevel() {
90-
return logLevel;
91-
}
9287

9388
@Override
9489
public String toString() {
@@ -100,7 +95,6 @@ public String toString() {
10095
", remoteSqlPluginPath='" + remoteSqlPluginPath + '\'' +
10196
", pluginLoadMode='" + pluginLoadMode + '\'' +
10297
", deployMode='" + deployMode + '\'' +
103-
", logLevel='" + logLevel + '\'' +
10498
", confProp=" + confProp +
10599
'}';
106100
}
@@ -160,10 +154,6 @@ public ParamsInfo.Builder setDeployMode(String deployMode) {
160154
return this;
161155
}
162156

163-
public ParamsInfo.Builder setLogLevel(String logLevel) {
164-
this.logLevel = logLevel;
165-
return this;
166-
}
167157

168158
public ParamsInfo.Builder setConfProp(Properties confProp) {
169159
this.confProp = confProp;
@@ -172,7 +162,7 @@ public ParamsInfo.Builder setConfProp(Properties confProp) {
172162

173163
public ParamsInfo build() {
174164
return new ParamsInfo(sql, name, jarUrlList, localSqlPluginPath,
175-
remoteSqlPluginPath, pluginLoadMode, deployMode, logLevel, confProp);
165+
remoteSqlPluginPath, pluginLoadMode, deployMode, confProp);
176166
}
177167
}
178168
}

core/src/main/java/com/dtstack/flink/sql/option/Options.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public class Options {
6969
@OptionRequired(description = "plugin load mode, by classpath or shipfile")
7070
private String pluginLoadMode = EPluginLoadMode.CLASSPATH.name();
7171

72-
private String logLevel;
73-
7472
public String getMode() {
7573
return mode;
7674
}
@@ -175,11 +173,4 @@ public void setPluginLoadMode(String pluginLoadMode) {
175173
this.pluginLoadMode = pluginLoadMode;
176174
}
177175

178-
public String getLogLevel() {
179-
return logLevel;
180-
}
181-
182-
public void setLogLevel(String logLevel) {
183-
this.logLevel = logLevel;
184-
}
185176
}

0 commit comments

Comments
 (0)