forked from JavaTX/JavaCompilerCore
Kleine Änderungen am Logger
This commit is contained in:
parent
b31f770fe3
commit
c62c31db6d
@ -95,6 +95,7 @@ public class MyCompiler implements MyCompilerAPI
|
||||
* Author: J<EFBFBD>rg B<EFBFBD>uerle<br/>
|
||||
* Der private Konstruktor. Es soll von au<EFBFBD>en kein Compiler angelegt werden
|
||||
* k<EFBFBD>nnen, sondern nur eine API zur Verf<EFBFBD>gung gestellt werden.
|
||||
* @param logger Konfiguration für Debug Ausgabe TODO
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.MyCompiler.21283.definition
|
||||
|
@ -2,7 +2,9 @@ package de.dhbwstuttgart.logger;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
public class Logger {
|
||||
|
||||
@ -75,5 +77,26 @@ public class Logger {
|
||||
public static void setStandardOutput(PrintStream outputStream) {
|
||||
Logger.standardOutput = outputStream;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class OutputHandler extends Handler{
|
||||
|
||||
private PrintStream output;
|
||||
|
||||
public OutputHandler(PrintStream output){
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
output.println(record.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws SecurityException {
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
package de.dhbwstuttgart.logger;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
public class OutputHandler extends Handler{
|
||||
|
||||
private PrintStream output;
|
||||
|
||||
public OutputHandler(PrintStream output){
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
output.println(record.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws SecurityException {
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user