Repository: bahir Updated Branches: refs/heads/master 560a799cf -> bce9cd159
[BAHIR-84] Suppress Parquet-MR build log messages Since Parquet-MR (1.7.0) uses Java Simple Logging (not Log4j) we need to add a logging.properties file and add it to the configuration of the maven-surefire-plugin and scalatest-maven-plugin. Since Parquet-MR is logging everything to System.out despite log file handler settings we raise the threshold to ERROR. https://github.com/Parquet/parquet-mr/issues/390 https://github.com/Parquet/parquet-mr/issues/425 Closes #33 Project: http://git-wip-us.apache.org/repos/asf/bahir/repo Commit: http://git-wip-us.apache.org/repos/asf/bahir/commit/bce9cd15 Tree: http://git-wip-us.apache.org/repos/asf/bahir/tree/bce9cd15 Diff: http://git-wip-us.apache.org/repos/asf/bahir/diff/bce9cd15 Branch: refs/heads/master Commit: bce9cd15989e648be03468c6a5b848ee8193df4d Parents: 560a799 Author: Christian Kadner <[email protected]> Authored: Thu Jan 12 00:07:02 2017 -0800 Committer: Christian Kadner <[email protected]> Committed: Thu Jan 19 19:14:30 2017 -0800 ---------------------------------------------------------------------- pom.xml | 2 + .../src/test/resources/logging.properties | 70 ++++++++++++++++++++ 2 files changed, 72 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bahir/blob/bce9cd15/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index a7ae91e..e7cb338 100644 --- a/pom.xml +++ b/pom.xml @@ -565,6 +565,7 @@ </environmentVariables> <systemProperties> <log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration> + <java.util.logging.config.file>${basedir}/src/test/resources/logging.properties</java.util.logging.config.file> <derby.system.durability>test</derby.system.durability> <java.awt.headless>true</java.awt.headless> <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir> @@ -614,6 +615,7 @@ </environmentVariables> <systemProperties> <log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration> + <java.util.logging.config.file>${basedir}/src/test/resources/logging.properties</java.util.logging.config.file> <derby.system.durability>test</derby.system.durability> <java.awt.headless>true</java.awt.headless> <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir> http://git-wip-us.apache.org/repos/asf/bahir/blob/bce9cd15/sql-streaming-mqtt/src/test/resources/logging.properties ---------------------------------------------------------------------- diff --git a/sql-streaming-mqtt/src/test/resources/logging.properties b/sql-streaming-mqtt/src/test/resources/logging.properties new file mode 100644 index 0000000..dd2cfc5 --- /dev/null +++ b/sql-streaming-mqtt/src/test/resources/logging.properties @@ -0,0 +1,70 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################ +# Global properties +############################################################ + +# "handlers" specifies a comma separated list of log Handler +# classes. These handlers will be installed during VM startup. +# Note that these classes must be on the system classpath. +# By default we only configure a ConsoleHandler, which will only +# show messages at the INFO and above levels. +handlers = java.util.logging.ConsoleHandler + +# To also add the FileHandler, use the following line instead. +#handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler + +# Default global logging level. +# This specifies which kinds of events are logged across +# all loggers. For any given facility this global level +# can be overriden by a facility specific level +# Note that the ConsoleHandler also has a separate level +# setting to limit messages printed to the console. +.level = INFO + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +# Log file output is in target directory. +java.util.logging.FileHandler.pattern = target/unit-tests-java-%u.log +java.util.logging.FileHandler.limit = 50000 +java.util.logging.FileHandler.count = 1 +java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter + +# Limit the message that are printed on the console to WARNING and above. +java.util.logging.ConsoleHandler.level = WARNING +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + +# Example to customize the SimpleFormatter output format +# to print one-line log message like this: +# <level>: <log message> [<date/time>] +# +# java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +# [BAHIR-] don't flood build logs with superfluous Parquet INFO messages +# they should be written to a file via FileHandler but they end up in the +# build log anyhow irrespective of the ConsoleHandler log level +# also see https://github.com/Parquet/parquet-mr/issues/425 +org.apache.parquet.hadoop.level=SEVERE
