From 4f1561336f4867e97cd8a6ad05b883e2058556a3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 24 Mar 2015 04:45:07 +0100 Subject: Use local LoggerIf, reflecting current log level of GlueGen --- .../java/com/jogamp/gluegen/jcpp/DefaultPreprocessorListener.java | 3 ++- src/main/java/com/jogamp/gluegen/jcpp/JCPP.java | 6 ++---- src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/jogamp/gluegen/jcpp/DefaultPreprocessorListener.java b/src/main/java/com/jogamp/gluegen/jcpp/DefaultPreprocessorListener.java index bcb3000..aeff3c8 100644 --- a/src/main/java/com/jogamp/gluegen/jcpp/DefaultPreprocessorListener.java +++ b/src/main/java/com/jogamp/gluegen/jcpp/DefaultPreprocessorListener.java @@ -31,12 +31,13 @@ import com.jogamp.gluegen.Logging.LoggerIf; */ public class DefaultPreprocessorListener implements PreprocessorListener { - private static final LoggerIf LOG = Logging.getLogger(DefaultPreprocessorListener.class); + private final LoggerIf LOG; private int errors; private int warnings; public DefaultPreprocessorListener() { + LOG = Logging.getLogger(DefaultPreprocessorListener.class); clear(); } diff --git a/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java b/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java index 91f93db..658306a 100644 --- a/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java +++ b/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java @@ -20,14 +20,11 @@ package com.jogamp.gluegen.jcpp; import java.io.File; -import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Reader; import java.util.ArrayList; -import java.util.Collection; import java.util.List; -import java.util.Map; import java.util.logging.Level; import com.jogamp.gluegen.ASTLocusTag; @@ -39,7 +36,7 @@ import com.jogamp.gluegen.Logging; import com.jogamp.gluegen.Logging.LoggerIf; public class JCPP implements GenericCPP { - private static final LoggerIf LOG = Logging.getLogger(JCPP.class); + private final LoggerIf LOG; public final Preprocessor cpp; private OutputStream out; @@ -47,6 +44,7 @@ public class JCPP implements GenericCPP { private final boolean enableCopyOutput2Stderr; public JCPP(final List includePaths, final boolean debug, final boolean copyOutput2Stderr) { + LOG = Logging.getLogger(JCPP.class); setOut(System.out); this.includePaths = includePaths; this.enableCopyOutput2Stderr = copyOutput2Stderr; diff --git a/src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java b/src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java index e3825a5..3208b0e 100644 --- a/src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java +++ b/src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java @@ -79,7 +79,7 @@ import com.jogamp.gluegen.jcpp.PreprocessorListener.SourceChangeEvent; */ public class Preprocessor implements Closeable { - private static final LoggerIf LOG = Logging.getLogger(Preprocessor.class); + private final LoggerIf LOG; private static final Source INTERNAL = new Source() { @Override @@ -127,6 +127,7 @@ public class Preprocessor implements Closeable { private PreprocessorListener listener; public Preprocessor() { + LOG = Logging.getLogger(Preprocessor.class); this.inputs = new ArrayList(); this.macros = new HashMap(); -- cgit v1.2.3