Browse Source

Merge pull request #181 in DESIGN/design from ~MATA.LI/designrel:release/10.0 to release/10.0

* commit '41db103a26da1019b856828364c60f44f54c52cc':
  REPORT-9284 REPORT-9159
  REPORT-9284 REPORT-9159
  REPORT-9284 REPORT-9159
master
Mata.Li 6 years ago
parent
commit
eb2b6997ef
  1. 2
      designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java
  2. 16
      designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java
  3. 1
      designer-realize/src/com/fr/start/Designer.java
  4. 2
      designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java

2
designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java

@ -37,7 +37,7 @@ public class DesignerLogAppender extends AppenderSkeleton {
synchronized (DesignerLogHandler.getInstance()) {
Level level = event.getLevel();
String msg = this.layout.format(event);
DesignerLogHandler.getInstance().printRemoteLog(msg, FRLogLevel.convertLog4jToJava(level), new Date());
DesignerLogHandler.getInstance().printRemoteLog(msg, level, new Date());
}
}
}

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

@ -6,14 +6,12 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.FRLogLevel;
import com.fr.general.Inter;
import com.fr.general.LogRecordTime;
import com.fr.general.log.Log4jConfig;
import com.fr.log.FineLoggerFactory;
import com.fr.log.LogHandler;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.xml.LogRecordTimeProvider;
import com.fr.third.apache.log4j.Level;
import javax.swing.*;
import javax.swing.text.BadLocationException;
@ -31,15 +29,14 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class DesignerLogHandler {
protected static final int INFO_INT = Level.INFO.intValue();
protected static final int ERROR_INT = Level.SEVERE.intValue();
protected static final int WARN_INT = Level.WARNING.intValue();
protected static final int INFO_INT = Level.INFO.toInt();
protected static final int ERROR_INT = Level.ERROR.toInt();
protected static final int WARN_INT = Level.WARN.toInt();
private static final int GAP_X = -150;
private static final int INFO_GAP_Y = -60;
private static final int ERRO_GAP_Y = -40;
@ -104,6 +101,7 @@ public class DesignerLogHandler {
@Override
public void actionPerformed(ActionEvent e) {
JPopupMenu jPopupMenu = new JPopupMenu();
int logLevelInt = Log4jConfig.getInstance().getRootLevel().toInt();
if (logLevelInt <= INFO_INT) {
jPopupMenu.add(showInfo);
@ -216,7 +214,7 @@ public class DesignerLogHandler {
}
public void printStackTrace(String message, Level level, Date date) {
int logLevelvalue = level.intValue();
int logLevelvalue = level.toInt();
if (logLevelvalue == INFO_INT && showInfo.isSelected()) {
printMessage(message, logLevelvalue, date);
} else if (logLevelvalue == ERROR_INT && showError.isSelected()) {

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

@ -118,6 +118,7 @@ public class Designer extends BaseDesigner {
//传递启动参数
designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args));
designerRoot.start();
if (WorkContext.getCurrent().isLocal()) {
//初始化一下serverTray
ServerTray.init();

2
designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java

@ -20,7 +20,7 @@ public class DesignerWorkspaceProvider extends Activator {
for (String arg : args) {
if (ComparatorUtils.equals(arg, "demo")) {
DesignerEnvManager.getEnvManager().setCurrentEnv2Default();
// ServerStarter.browserDemoURL();
ServerStarter.browserDemoURL();
break;
}
}

Loading…
Cancel
Save