Browse Source

REPORT-9284 REPORT-9159

master
Mata.Li 7 years ago
parent
commit
ab51a98c12
  1. 4
      designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java
  2. 12
      designer-realize/src/com/fr/start/Designer.java

4
designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java

@ -6,6 +6,7 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogLevel;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.LogRecordTime; import com.fr.general.LogRecordTime;
@ -119,7 +120,8 @@ public class DesignerLogHandler {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
JPopupMenu jPopupMenu = new JPopupMenu(); JPopupMenu jPopupMenu = new JPopupMenu();
int logLevelInt = Log4jConfig.getInstance().getRootLevel().toInt(); //这里把log4j的日志级别也转成java级别,可以进行比对
int logLevelInt = FRLogLevel.convertLog4jToJava(Log4jConfig.getInstance().getRootLevel()).intValue();
if (logLevelInt <= INFO_INT) { if (logLevelInt <= INFO_INT) {
jPopupMenu.add(showInfo); jPopupMenu.add(showInfo);
jPopupMenu.add(showError); jPopupMenu.add(showError);

12
designer-realize/src/com/fr/start/Designer.java

@ -115,6 +115,18 @@ public class Designer extends BaseDesigner {
//传递启动参数 //传递启动参数
designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args)); designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args));
designerRoot.start(); designerRoot.start();
//加入从产品演示启动
if (args != null) {
for (String arg : args) {
if (ComparatorUtils.equals(arg, "demo")) {
DesignerEnvManager.getEnvManager().setCurrentEnv2Default();
ServerStarter.browserDemoURL();
break;
}
}
}
if (WorkContext.getCurrent().isLocal()) { if (WorkContext.getCurrent().isLocal()) {
//初始化一下serverTray //初始化一下serverTray
ServerTray.init(); ServerTray.init();

Loading…
Cancel
Save