From f9c4b5fe4470e1c437fda20c6caee8a124fdc37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 1 Jun 2021 11:22:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-52933=20[=E9=98=BB=E6=AD=A2]?= =?UTF-8?q?=E4=BF=AE=E6=94=B9log=E5=AF=BC=E5=87=BA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=90=8E=EF=BC=8Clog=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/DesignerEnvManager.java | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index b8951ea8ba..e5a8e7cf4f 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -15,20 +15,18 @@ import com.fr.design.env.DesignerWorkspaceType; import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.design.env.RemoteDesignerWorkspaceInfo; import com.fr.design.file.HistoryTemplateListPane; -import com.fr.design.fun.DesignerPortProvider; import com.fr.design.i18n.Toolkit; import com.fr.design.locale.impl.ProductImproveMark; import com.fr.design.mainframe.vcs.VcsConfigManager; import com.fr.design.notification.SnapChatConfig; import com.fr.design.port.DesignerPortContext; -import com.fr.design.update.push.DesignerPushUpdateConfigManager; import com.fr.design.style.color.ColorSelectConfigManager; +import com.fr.design.update.push.DesignerPushUpdateConfigManager; import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignerPort; import com.fr.exit.DesignerExiter; import com.fr.file.FILEFactory; import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogFormatter; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.SupportLocale; @@ -36,15 +34,14 @@ import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleMark; import com.fr.general.xml.GeneralXMLTools; import com.fr.log.FineLoggerFactory; +import com.fr.log.LogHandler; import com.fr.stable.CommonUtils; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; -import com.fr.stable.EnvChangedListener; import com.fr.stable.ListMap; import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import com.fr.stable.bridge.StableFactory; import com.fr.stable.core.UUID; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLPrintWriter; @@ -52,6 +49,7 @@ import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLWriter; import com.fr.stable.xml.XMLableReader; +import com.fr.third.apache.log4j.FileAppender; import com.fr.third.org.apache.commons.io.FilenameUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContextCallback; @@ -78,8 +76,6 @@ import java.util.ListIterator; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; -import java.util.logging.FileHandler; -import java.util.logging.Handler; /** * The manager of Designer GUI. @@ -306,14 +302,23 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { calender.setTimeInMillis(System.currentTimeMillis()); String today = calender.get(Calendar.YEAR) + "-" + (calender.get(Calendar.MONTH) + 1) + "-" + calender.get(Calendar.DAY_OF_MONTH); - String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log"); + final String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log"); if (!new File(fileName).exists()) { StableUtils.makesureFileExist(new File(fileName)); } - Handler handler = new FileHandler(fileName, true); + LogHandler handler = new LogHandler() { + final FileAppender appender = new FileAppender( + new com.fr.third.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"), + fileName + ); + + @Override + public FileAppender getHandler() { + return appender; + } + }; - handler.setFormatter(new FRLogFormatter()); - FineLoggerFactory.getLogger().addLogHandler(handler); + FineLoggerFactory.getLogger().addLogAppender(handler); } catch (SecurityException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IOException e) { From 648f175fe07297ead80bff677866bc8070b6d42b Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 1 Jun 2021 15:35:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-53036=20=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E5=90=88=E5=85=A5=E4=B8=BB=E7=89=88=E6=9C=AC-?= =?UTF-8?q?=E4=B8=8B=E6=BB=91=E5=87=BA=E7=8E=B0=E7=9A=84=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=8F=90=E7=A4=BA=EF=BC=8C=E8=93=9D=E5=AD=97?= =?UTF-8?q?=E9=A2=84=E6=9C=9F=E6=98=AF=E2=80=9C=E5=A4=8D=E7=94=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E2=80=9D=EF=BC=8C=E7=8E=B0=E5=9C=A8=E6=98=AF=E2=80=9C?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A4=8D=E7=94=A8=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/ReuseTriggerPointManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/ReuseTriggerPointManager.java b/designer-form/src/main/java/com/fr/design/mainframe/ReuseTriggerPointManager.java index beb779be8c..e0b975fb0c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/ReuseTriggerPointManager.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/ReuseTriggerPointManager.java @@ -177,7 +177,7 @@ public class ReuseTriggerPointManager { private JPanel createReusePrompt(JForm jForm) { JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); jPanel.add(new UILabel(Toolkit.i18nText("Fine-Design_Component_Reuse_Try_Prompt")), BorderLayout.WEST); - UILabel reuseLabel = new UILabel(Toolkit.i18nText("Fine-Design_Component_Reuse")); + UILabel reuseLabel = new UILabel(Toolkit.i18nText("Fine-Design_Share_Component")); reuseLabel.addMouseListener(new MouseListener() { @Override public void mouseClicked(MouseEvent e) {