diff --git a/Generators/src/main/java/io/deephaven/gen/AbstractBasicJavaGenerator.java b/Generators/src/main/java/io/deephaven/gen/AbstractBasicJavaGenerator.java index bc599770847..689225976d6 100644 --- a/Generators/src/main/java/io/deephaven/gen/AbstractBasicJavaGenerator.java +++ b/Generators/src/main/java/io/deephaven/gen/AbstractBasicJavaGenerator.java @@ -41,14 +41,22 @@ public abstract class AbstractBasicJavaGenerator { * @param skipsGen Collection of predicates to determine if a function should be skipped when generating code. * @throws ClassNotFoundException If a class in the imports array cannot be found. */ - public AbstractBasicJavaGenerator(final String gradleTask, final String packageName, final String className, - final String[] imports, Predicate includeMethod, Collection> skipsGen) + public AbstractBasicJavaGenerator( + final String gradleTask, + final String packageName, + final String className, + final String[] imports, + final Predicate includeMethod, + final Collection> skipsGen, + final Level logLevel) throws ClassNotFoundException { this.gradleTask = gradleTask; this.packageName = packageName; this.className = className; this.skipsGen = skipsGen; + log.setLevel(logLevel); + for (String imp : imports) { Class c = Class.forName(imp, false, Thread.currentThread().getContextClassLoader()); log.info("Processing class: " + c); @@ -158,7 +166,6 @@ public static void runCommandLine(final AbstractBasicJavaGenerator gen, final St System.exit(-1); } - log.setLevel(Level.WARNING); log.warning("Running " + gen.getClass().getSimpleName() + " assertNoChange=" + assertNoChange); final String code = gen.generateCode(); diff --git a/Generators/src/main/java/io/deephaven/libs/GroovyStaticImportGenerator.java b/Generators/src/main/java/io/deephaven/libs/GroovyStaticImportGenerator.java index 6af9734b7b0..c562f73052f 100644 --- a/Generators/src/main/java/io/deephaven/libs/GroovyStaticImportGenerator.java +++ b/Generators/src/main/java/io/deephaven/libs/GroovyStaticImportGenerator.java @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.Collections; import java.util.function.Predicate; +import java.util.logging.Level; import java.util.stream.Collectors; @@ -25,9 +26,9 @@ public class GroovyStaticImportGenerator extends AbstractBasicJavaGenerator { public GroovyStaticImportGenerator(String gradleTask, String packageName, String className, String[] imports, - Predicate includeMethod, Collection> skipsGen) + Predicate includeMethod, Collection> skipsGen, Level logLevel) throws ClassNotFoundException { - super(gradleTask, packageName, className, imports, includeMethod, skipsGen); + super(gradleTask, packageName, className, imports, includeMethod, skipsGen, logLevel); } @Override @@ -79,7 +80,8 @@ public static void main(String[] args) throws ClassNotFoundException, IOExceptio // skipping common erasure "sum" Collections.singletonList((f) -> f.getMethodName().equals("sum") && f.getParameterTypes().length == 1 && f.getParameterTypes()[0].getTypeName() - .contains("ObjectVector<"))); + .contains("ObjectVector<")), + Level.WARNING); runCommandLine(gen, relativeFilePath, args); } diff --git a/Generators/src/main/java/io/deephaven/libs/StaticCalendarMethodsGenerator.java b/Generators/src/main/java/io/deephaven/libs/StaticCalendarMethodsGenerator.java index 75c3c6183d0..97459bf4ea7 100644 --- a/Generators/src/main/java/io/deephaven/libs/StaticCalendarMethodsGenerator.java +++ b/Generators/src/main/java/io/deephaven/libs/StaticCalendarMethodsGenerator.java @@ -13,6 +13,7 @@ import java.util.*; import java.util.function.Function; import java.util.function.Predicate; +import java.util.logging.Level; import java.util.stream.Collectors; /** @@ -24,8 +25,8 @@ public class StaticCalendarMethodsGenerator extends AbstractBasicJavaGenerator { public StaticCalendarMethodsGenerator(String gradleTask, String packageName, String className, String[] imports, Predicate includeMethod, Collection> skipsGen, - Function renamer) throws ClassNotFoundException { - super(gradleTask, packageName, className, imports, includeMethod, skipsGen); + Function renamer, Level logLevel) throws ClassNotFoundException { + super(gradleTask, packageName, className, imports, includeMethod, skipsGen, logLevel); this.renamer = renamer; } @@ -93,7 +94,8 @@ public static void main(String[] args) throws ClassNotFoundException, IOExceptio } else { return s; } - }); + }, + Level.WARNING); runCommandLine(gen, relativeFilePath, args); } diff --git a/Generators/src/main/java/io/deephaven/plot/util/GeneratePlottingConvenience.java b/Generators/src/main/java/io/deephaven/plot/util/GeneratePlottingConvenience.java index 4c6f5cea056..524c56e1c6d 100644 --- a/Generators/src/main/java/io/deephaven/plot/util/GeneratePlottingConvenience.java +++ b/Generators/src/main/java/io/deephaven/plot/util/GeneratePlottingConvenience.java @@ -110,7 +110,7 @@ private void addPublicMethod(Method m, Map functions boolean skip = skip(f, ignoreSkips); if (skip) { - log.warning("*** Skipping function: " + f); + log.info("*** Skipping function: " + f); return; } @@ -167,7 +167,7 @@ private String generateCode() { final boolean skip = skip(f, true); if (skip) { - log.warning("*** Skipping static function: " + f); + log.info("*** Skipping static function: " + f); continue; } @@ -183,7 +183,7 @@ private String generateCode() { final boolean skip = skip(f, false); if (skip) { - log.warning("*** Skipping function: " + f); + log.info("*** Skipping function: " + f); continue; }