From b31f770fe3a48036d8e5f1e7e5662037a5734440 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 9 Oct 2014 17:38:29 +0200 Subject: [PATCH] =?UTF-8?q?Logger=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhbwstuttgart/logger/OutputHandler.java | 29 +++++++++++++++++++ src/de/dhbwstuttgart/logger/Section.java | 7 +++++ 2 files changed, 36 insertions(+) create mode 100644 src/de/dhbwstuttgart/logger/OutputHandler.java create mode 100644 src/de/dhbwstuttgart/logger/Section.java diff --git a/src/de/dhbwstuttgart/logger/OutputHandler.java b/src/de/dhbwstuttgart/logger/OutputHandler.java new file mode 100644 index 00000000..fc57d746 --- /dev/null +++ b/src/de/dhbwstuttgart/logger/OutputHandler.java @@ -0,0 +1,29 @@ +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 { + } + + +} diff --git a/src/de/dhbwstuttgart/logger/Section.java b/src/de/dhbwstuttgart/logger/Section.java new file mode 100644 index 00000000..9fb2c66c --- /dev/null +++ b/src/de/dhbwstuttgart/logger/Section.java @@ -0,0 +1,7 @@ +package de.dhbwstuttgart.logger; + +public enum Section { + TYPEINFERENCE, + PARSER, + CODEGEN; +}