소스 검색

SDK
- annotate USERINFO log level, clean up ApplicationLogHandler

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10279 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 12 년 전
부모
커밋
62bc8cce26
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      jme3-core/src/com/jme3/gde/core/scene/ApplicationLogHandler.java

+ 7 - 3
jme3-core/src/com/jme3/gde/core/scene/ApplicationLogHandler.java

@@ -52,6 +52,10 @@ public class ApplicationLogHandler extends Handler implements Callable<JButton>
 
     public static class LogLevel extends Level {
 
+        /**
+         * Log level of 801 (one above "INFO") - used to display messages
+         * to the user via the little "monkey bubble" bottom right.
+         */
         public static final Level USERINFO = new LogLevel("User Info", 801, "User Info Log Level");
         public LogLevel(String name, int level, String string) {
             super(name, level, string);
@@ -81,14 +85,14 @@ public class ApplicationLogHandler extends Handler implements Callable<JButton>
                 io.getErr().println(formatter.formatMessage(record));
             }
         } else if (record.getLevel().equals(Level.WARNING)) {
-            io.getErr().println(formatter.formatMessage(record));
             NotifyUtil.show("Warning", formatter.formatMessage(record), MessageType.WARNING, listener, 5000);
-        } else if (record.getLevel().equals(Level.INFO)) {
-            io.getOut().println(formatter.formatMessage(record));
+            io.getErr().println(formatter.formatMessage(record));
         } else if (record.getLevel().intValue() > 800) {
             //larger than INFO:
             NotifyUtil.show("Info", formatter.formatMessage(record), MessageType.INFO, listener, 3000);
             io.getOut().println(formatter.formatMessage(record));
+        } else if (record.getLevel().equals(Level.INFO)) {
+            io.getOut().println(formatter.formatMessage(record));
         } else {
             io.getOut().println(formatter.formatMessage(record));
         }