SDK
- annotate USERINFO log level, clean up ApplicationLogHandler git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10279 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
14b65d758b
commit
30eec0beeb
@ -52,6 +52,10 @@ public class ApplicationLogHandler extends Handler implements Callable<JButton>
|
|||||||
|
|
||||||
public static class LogLevel extends Level {
|
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 static final Level USERINFO = new LogLevel("User Info", 801, "User Info Log Level");
|
||||||
public LogLevel(String name, int level, String string) {
|
public LogLevel(String name, int level, String string) {
|
||||||
super(name, level, string);
|
super(name, level, string);
|
||||||
@ -81,14 +85,14 @@ public class ApplicationLogHandler extends Handler implements Callable<JButton>
|
|||||||
io.getErr().println(formatter.formatMessage(record));
|
io.getErr().println(formatter.formatMessage(record));
|
||||||
}
|
}
|
||||||
} else if (record.getLevel().equals(Level.WARNING)) {
|
} else if (record.getLevel().equals(Level.WARNING)) {
|
||||||
io.getErr().println(formatter.formatMessage(record));
|
|
||||||
NotifyUtil.show("Warning", formatter.formatMessage(record), MessageType.WARNING, listener, 5000);
|
NotifyUtil.show("Warning", formatter.formatMessage(record), MessageType.WARNING, listener, 5000);
|
||||||
} else if (record.getLevel().equals(Level.INFO)) {
|
io.getErr().println(formatter.formatMessage(record));
|
||||||
io.getOut().println(formatter.formatMessage(record));
|
|
||||||
} else if (record.getLevel().intValue() > 800) {
|
} else if (record.getLevel().intValue() > 800) {
|
||||||
//larger than INFO:
|
//larger than INFO:
|
||||||
NotifyUtil.show("Info", formatter.formatMessage(record), MessageType.INFO, listener, 3000);
|
NotifyUtil.show("Info", formatter.formatMessage(record), MessageType.INFO, listener, 3000);
|
||||||
io.getOut().println(formatter.formatMessage(record));
|
io.getOut().println(formatter.formatMessage(record));
|
||||||
|
} else if (record.getLevel().equals(Level.INFO)) {
|
||||||
|
io.getOut().println(formatter.formatMessage(record));
|
||||||
} else {
|
} else {
|
||||||
io.getOut().println(formatter.formatMessage(record));
|
io.getOut().println(formatter.formatMessage(record));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user