From 0e7d26b97108d8a75ce4dee8e5558149ad86267e Mon Sep 17 00:00:00 2001 From: Anner Date: Wed, 25 Sep 2024 11:26:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-135672=20fix:=20=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E9=98=B6=E6=AE=B5=E4=BB=8E=E6=9C=AC=E5=9C=B0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E5=85=BC=E5=AE=B9fp=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/boot/env/DesignEnvComponent.java | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java index 93a47a9280..2a04889c52 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java @@ -55,6 +55,7 @@ import com.fr.env.detect.EnvDetectorCenter; import com.fr.event.EventDispatcher; import com.fr.general.FRLogger; import com.fr.general.log.Log4jConfig; +import com.fr.general.log.Log4jConfigFactory; import com.fr.general.log.Log4jUtils; import com.fr.intelli.metrics.Compute; import com.fr.intelli.metrics.DBMonitorInterceptor; @@ -88,6 +89,7 @@ import com.fr.stable.db.session.DBSession; import com.fr.stable.project.ProjectConstants; import com.fr.tenant.context.TenantContext; import com.fr.tenant.context.provider.CurrentTenantKey; +import com.fr.third.apache.logging.log4j.Level; import com.fr.third.apache.logging.log4j.core.config.Configurator; import com.fr.third.net.bytebuddy.implementation.MethodDelegation; import com.fr.third.net.bytebuddy.matcher.ElementMatchers; @@ -244,6 +246,8 @@ public class DesignEnvComponent { * ----------- logger -------- */ private void startLogger() { + // 获取本地的日志级别配置 + Log4jConfigFactory.getInstance().setRootLevel(Log4jConfig.getInstance().getRootLevel()); URI uri = Log4jUtils.buildUserConfigURI(StringUtils.EMPTY); FRLogger.getLogger().config(uri); // 日志配置更新的监听在FRLogger里面,fbp去掉了但是设计器本地还是需要这个监听的,初始化的时候监听一下 @@ -251,21 +255,19 @@ public class DesignEnvComponent { } private void listenConfig() { -/// 等fbp改完,现在先配合打包注释掉 -// ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() { -// -// @Override -// public boolean accept(Class configClass) { -// return configClass.equals(Log4jConfig.class); -// } -// -// @Override -// public void change() { -// // The root logger is the topmost logger with a name of "" (the empty string). -// Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel()); -// } -// }); - + ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() { + + @Override + public boolean accept(Class configClass) { + return configClass.equals(Log4jConfig.class); + } + + @Override + public void change() { + // The root logger is the topmost logger with a name of "" (the empty string). + Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel()); + } + }); } private void stopLogger() { From 7ab1e2a1f462c7efc5c2794028bb3afbf9ce1d40 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 25 Sep 2024 11:39:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-135703=20=E3=80=90fr-fbp=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91linux=E8=AE=BE=E8=AE=A1=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91-=E6=9E=84=E5=BB=BA=E6=A0=91?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=82=B9=E4=B8=8D=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/data/datapane/TreeTableDataComboBox.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java index a19de0d602..8954d12593 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java @@ -13,7 +13,6 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; -import com.fr.security.encryption.transmission.TransmissionEncryptionManager; import com.fr.stable.StringUtils; import com.fr.workspace.server.repository.connection.ConnectionRepository; import com.fr.workspace.server.repository.tabledata.TableDataRepository; @@ -73,14 +72,11 @@ public class TreeTableDataComboBox extends UIComboBox { Map map = new HashMap<>(); final Map connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); try { - TransmissionEncryptionManager.setTransEncryptionLevel(1); for (ServerDataSetBean bean : beans) { map.put(bean.getDatasetName() , TableDataBeanHelper.getTableDataSet(connectionMap, bean.getDatasetType(), bean.getDatasetData())); } } catch (Exception e) { throw new RuntimeException(e); - } finally { - TransmissionEncryptionManager.removeTransEncryptionLevel(); } for (Map.Entry entry : map.entrySet()) { TableData tableData = entry.getValue();