org.jfree.util
public class: PrintStreamLogTarget [javadoc |
source]
java.lang.Object
org.jfree.util.PrintStreamLogTarget
All Implemented Interfaces:
Serializable, LogTarget
A log target that sends output to a
PrintStream .
| Method from org.jfree.util.PrintStreamLogTarget Summary: |
|---|
|
log, log |
| Method from org.jfree.util.PrintStreamLogTarget Detail: |
public void log(int level,
Object message) {
if (level > 3) {
level = 3;
}
this.printStream.print(LEVELS[level]);
this.printStream.println(message);
if (level < 3) {
System.out.flush();
}
}
Logs a message to the main log stream. All attached logStreams will also
receive this message. If the given log-level is higher than the given
debug-level in the main config file, no logging will be done. |
public void log(int level,
Object message,
Exception e) {
if (level > 3) {
level = 3;
}
this.printStream.print(LEVELS[level]);
this.printStream.println(message);
e.printStackTrace(this.printStream);
if (level < 3) {
System.out.flush();
}
}
logs an message to the main-log stream. All attached logStreams will also
receive this message. If the given log-level is higher than the given
debug-level in the main config file, no logging will be done.
The exception's stacktrace will be appended to the log-stream |