Skip to content

Commit c475536

Browse files
committed
remove log level and modify objectmapper class
1 parent 82e5534 commit c475536

File tree

5 files changed

+3
-39
lines changed

5 files changed

+3
-39
lines changed

core/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@
121121
<artifactId>junit</artifactId>
122122
<version>4.12</version>
123123
</dependency>
124-
<dependency>
125-
<groupId>ch.qos.logback</groupId>
126-
<artifactId>logback-classic</artifactId>
127-
<version>1.1.7</version>
128-
</dependency>
129124

130125
</dependencies>
131126

core/src/main/java/com/dtstack/flink/sql/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
import org.slf4j.Logger;
2828
import org.slf4j.LoggerFactory;
2929

30-
import ch.qos.logback.classic.Level;
31-
import ch.qos.logback.classic.LoggerContext;
32-
3330
/**
3431
* Date: 2018/6/26
3532
* Company: www.dtstack.com
@@ -45,10 +42,4 @@ public static void main(String[] args) throws Exception {
4542
env.execute(paramsInfo.getName());
4643
LOG.info("program {} execution success", paramsInfo.getName());
4744
}
48-
private static void setLogLevel(String level){
49-
LoggerContext loggerContext= (LoggerContext) LoggerFactory.getILoggerFactory();
50-
//设置全局日志级别
51-
ch.qos.logback.classic.Logger logger = loggerContext.getLogger("root");
52-
logger.setLevel(Level.toLevel(level, Level.INFO));
53-
}
5445
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.dtstack.flink.sql.exec;
22

3-
import org.codehaus.jackson.map.ObjectMapper;
3+
import com.fasterxml.jackson.databind.ObjectMapper;
44
import org.slf4j.Logger;
55
import org.slf4j.LoggerFactory;
66

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
package com.dtstack.flink.sql.exec;
2020

21-
import ch.qos.logback.classic.Level;
22-
import ch.qos.logback.classic.LoggerContext;
2321
import com.dtstack.flink.sql.classloader.ClassLoaderManager;
2422
import com.dtstack.flink.sql.config.CalciteConfig;
2523
import com.dtstack.flink.sql.enums.ClusterMode;
@@ -128,7 +126,6 @@ public static ParamsInfo parseParams(String[] args) throws Exception {
128126
.setDeployMode(deployMode)
129127
.setConfProp(confProperties)
130128
.setJarUrlList(jarURList)
131-
.setLogLevel(logLevel)
132129
.build();
133130

134131
}
@@ -154,8 +151,6 @@ public static StreamExecutionEnvironment getStreamExecution(ParamsInfo paramsInf
154151
StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
155152
StreamQueryConfig streamQueryConfig = StreamEnvConfigManager.getStreamQueryConfig(tableEnv, paramsInfo.getConfProp());
156153

157-
setLogLevel(paramsInfo.getLogLevel());
158-
159154
SqlParser.setLocalSqlPluginRoot(paramsInfo.getLocalSqlPluginPath());
160155
SqlTree sqlTree = SqlParser.parseSql(paramsInfo.getSql());
161156

@@ -348,11 +343,5 @@ public static StreamExecutionEnvironment getStreamExeEnv(Properties confProperti
348343
return env;
349344
}
350345

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-
}
357346

358347
}

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

Lines changed: 2 additions & 13 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,10 +84,6 @@ public Properties getConfProp() {
8684
return confProp;
8785
}
8886

89-
public String getLogLevel() {
90-
return logLevel;
91-
}
92-
9387
@Override
9488
public String toString() {
9589
return "ParamsInfo{" +
@@ -100,7 +94,6 @@ public String toString() {
10094
", remoteSqlPluginPath='" + remoteSqlPluginPath + '\'' +
10195
", pluginLoadMode='" + pluginLoadMode + '\'' +
10296
", deployMode='" + deployMode + '\'' +
103-
", logLevel='" + logLevel + '\'' +
10497
", confProp=" + confProp +
10598
'}';
10699
}
@@ -160,10 +153,6 @@ public ParamsInfo.Builder setDeployMode(String deployMode) {
160153
return this;
161154
}
162155

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

168157
public ParamsInfo.Builder setConfProp(Properties confProp) {
169158
this.confProp = confProp;
@@ -172,7 +161,7 @@ public ParamsInfo.Builder setConfProp(Properties confProp) {
172161

173162
public ParamsInfo build() {
174163
return new ParamsInfo(sql, name, jarUrlList, localSqlPluginPath,
175-
remoteSqlPluginPath, pluginLoadMode, deployMode, logLevel, confProp);
164+
remoteSqlPluginPath, pluginLoadMode, deployMode, confProp);
176165
}
177166
}
178167
}

0 commit comments

Comments
 (0)