Repository: calcite Updated Branches: refs/heads/master 56def3946 -> ef8226076
Silence Pig, Spark, and Elasticsearch logs in tests Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/3183f2ca Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/3183f2ca Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/3183f2ca Branch: refs/heads/master Commit: 3183f2cae6db91f0c2bb0fc99ff6121da56652b8 Parents: 56def39 Author: Vladimir Sitnikov <[email protected]> Authored: Fri Sep 21 18:29:07 2018 +0300 Committer: Vladimir Sitnikov <[email protected]> Committed: Fri Sep 21 18:29:07 2018 +0300 ---------------------------------------------------------------------- elasticsearch/src/test/resources/log4j2.xml | 1 + pig/src/test/resources/log4j.properties | 28 ++++++++++++++++++++++++ spark/src/test/resources/log4j.properties | 27 +++++++++++++++++++++++ 3 files changed, 56 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/3183f2ca/elasticsearch/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/elasticsearch/src/test/resources/log4j2.xml b/elasticsearch/src/test/resources/log4j2.xml index 3e28263..d56c70e 100644 --- a/elasticsearch/src/test/resources/log4j2.xml +++ b/elasticsearch/src/test/resources/log4j2.xml @@ -25,6 +25,7 @@ limitations under the License. </Appenders> <Loggers> + <Logger name="org.elasticsearch" level="WARN"/> <Root level="INFO" additivity="false"> <AppenderRef ref="console" /> </Root> http://git-wip-us.apache.org/repos/asf/calcite/blob/3183f2ca/pig/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/pig/src/test/resources/log4j.properties b/pig/src/test/resources/log4j.properties new file mode 100644 index 0000000..cf25720 --- /dev/null +++ b/pig/src/test/resources/log4j.properties @@ -0,0 +1,28 @@ +# 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. + +# Root logger is configured at INFO and is sent to A1 +log4j.rootLogger=INFO, A1 + +# Silence Pig output by default +log4j.logger.org.apache.pig=WARN +log4j.logger.org.apache.hadoop=WARN + +# A1 goes to the console +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# Set the pattern for each log message +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p - %m%n http://git-wip-us.apache.org/repos/asf/calcite/blob/3183f2ca/spark/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/src/test/resources/log4j.properties b/spark/src/test/resources/log4j.properties new file mode 100644 index 0000000..0ec8844 --- /dev/null +++ b/spark/src/test/resources/log4j.properties @@ -0,0 +1,27 @@ +# 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. + +# Root logger is configured at INFO and is sent to A1 +log4j.rootLogger=INFO, A1 + +# Silence Spark output by default +log4j.logger.org.apache.spark=WARN + +# A1 goes to the console +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# Set the pattern for each log message +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p - %m%n
