FLUME-2050. Upgrade to Log4j 2.10.0 This closes #181
Reviewers: Ferenc Szabo (Ralph Goers via Denes Arvay) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/69c66efe Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/69c66efe Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/69c66efe Branch: refs/heads/trunk Commit: 69c66efefdcd74904986f2727bdf0d52dd9a75e5 Parents: e4312ad Author: Ralph Goers <[email protected]> Authored: Thu Nov 2 23:01:58 2017 -0700 Committer: Denes Arvay <[email protected]> Committed: Fri Jan 26 16:22:28 2018 +0100 ---------------------------------------------------------------------- conf/log4j.properties | 68 ------ conf/log4j2.xml | 56 +++++ flume-ng-auth/pom.xml | 29 ++- flume-ng-channels/flume-file-channel/pom.xml | 28 ++- .../src/test/resources/log4j.properties | 25 --- .../src/test/resources/log4j2.xml | 30 +++ flume-ng-channels/flume-jdbc-channel/pom.xml | 22 +- flume-ng-channels/flume-kafka-channel/pom.xml | 1 - .../src/test/resources/log4j.properties | 78 ------- .../src/test/resources/log4j2.xml | 72 +++++++ .../flume-spillable-memory-channel/pom.xml | 22 +- flume-ng-clients/flume-ng-log4jappender/pom.xml | 2 + flume-ng-configuration/pom.xml | 19 +- flume-ng-core/pom.xml | 13 +- .../src/test/resources/log4j.properties | 24 --- flume-ng-core/src/test/resources/log4j2.xml | 31 +++ flume-ng-dist/pom.xml | 12 ++ flume-ng-embedded-agent/pom.xml | 16 +- .../src/test/resources/log4j.properties | 24 --- .../src/test/resources/log4j2.xml | 31 +++ .../flume-avro-source/pom.xml | 22 +- .../flume-thrift-source/pom.xml | 22 +- .../src/test/resources/log4j.properties | 25 --- .../src/test/resources/log4j2.xml | 31 +++ flume-ng-node/pom.xml | 18 +- .../src/test/resources/log4j.properties | 24 --- flume-ng-node/src/test/resources/log4j2.xml | 31 +++ flume-ng-sdk/pom.xml | 25 ++- .../src/test/resources/log4j.properties | 24 --- flume-ng-sdk/src/test/resources/log4j2.xml | 31 +++ flume-ng-sinks/flume-dataset-sink/pom.xml | 32 ++- flume-ng-sinks/flume-hdfs-sink/pom.xml | 32 ++- .../src/test/resources/log4j.properties | 26 --- .../src/test/resources/log4j2.xml | 33 +++ flume-ng-sinks/flume-hive-sink/pom.xml | 62 +++++- .../src/test/resources/log4j.properties | 26 --- .../src/test/resources/log4j2.xml | 33 +++ flume-ng-sinks/flume-http-sink/pom.xml | 21 +- .../org/apache/flume/sink/http/HttpSink.java | 5 +- .../src/test/resources/log4j.properties | 28 --- .../src/test/resources/log4j2.xml | 30 +++ flume-ng-sinks/flume-irc-sink/pom.xml | 22 +- .../flume-ng-elasticsearch-sink/pom.xml | 22 +- .../src/test/resources/log4j.properties | 25 --- .../src/test/resources/log4j2.xml | 31 +++ flume-ng-sinks/flume-ng-hbase-sink/pom.xml | 72 ++++++- flume-ng-sinks/flume-ng-kafka-sink/pom.xml | 24 +++ .../src/test/resources/log4j.properties | 78 ------- .../src/test/resources/log4j2.xml | 72 +++++++ .../flume-ng-morphline-solr-sink/pom.xml | 37 +++- .../src/test/resources/log4j.properties | 34 --- .../src/test/resources/log4j2.xml | 38 ++++ flume-ng-sources/flume-jms-source/pom.xml | 22 +- flume-ng-sources/flume-kafka-source/pom.xml | 20 ++ .../src/test/resources/log4j.properties | 25 --- .../src/test/resources/log4j2.xml | 31 +++ flume-ng-sources/flume-scribe-source/pom.xml | 22 +- .../src/test/resources/log4j.properties | 33 --- .../src/test/resources/log4j2.xml | 37 ++++ flume-ng-tests/pom.xml | 24 ++- .../src/test/resources/log4j.properties | 25 --- flume-ng-tests/src/test/resources/log4j2.xml | 31 +++ pom.xml | 206 +++++++++++++++++-- 63 files changed, 1445 insertions(+), 670 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/conf/log4j.properties ---------------------------------------------------------------------- diff --git a/conf/log4j.properties b/conf/log4j.properties deleted file mode 100644 index c948bff..0000000 --- a/conf/log4j.properties +++ /dev/null @@ -1,68 +0,0 @@ -# -# 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. -# - -# Define some default values that can be overridden by system properties. -# -# For testing, it may also be convenient to specify -# -Dflume.root.logger=DEBUG,console when launching flume. - -#flume.root.logger=DEBUG,console -flume.root.logger=INFO,LOGFILE -flume.log.dir=./logs -flume.log.file=flume.log - -log4j.logger.org.apache.flume.lifecycle = INFO -log4j.logger.org.jboss = WARN -log4j.logger.org.mortbay = INFO -log4j.logger.org.apache.avro.ipc.NettyTransceiver = WARN -log4j.logger.org.apache.hadoop = INFO -log4j.logger.org.apache.hadoop.hive = ERROR - -# Define the root logger to the system property "flume.root.logger". -log4j.rootLogger=${flume.root.logger} - - -# Stock log4j rolling file appender -# Default log rotation configuration -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -log4j.appender.LOGFILE.MaxFileSize=100MB -log4j.appender.LOGFILE.MaxBackupIndex=10 -log4j.appender.LOGFILE.File=${flume.log.dir}/${flume.log.file} -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n - - -# Warning: If you enable the following appender it will fill up your disk if you don't have a cleanup job! -# This uses the updated rolling file appender from log4j-extras that supports a reliable time-based rolling policy. -# See http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html -# Add "DAILY" to flume.root.logger above if you want to use this -log4j.appender.DAILY=org.apache.log4j.rolling.RollingFileAppender -log4j.appender.DAILY.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy -log4j.appender.DAILY.rollingPolicy.ActiveFileName=${flume.log.dir}/${flume.log.file} -log4j.appender.DAILY.rollingPolicy.FileNamePattern=${flume.log.dir}/${flume.log.file}.%d{yyyy-MM-dd} -log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout -log4j.appender.DAILY.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n - - -# console -# Add "console" to flume.root.logger above if you want to use this -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.target=System.err -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%d (%t) [%p - %l] %m%n http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/conf/log4j2.xml ---------------------------------------------------------------------- diff --git a/conf/log4j2.xml b/conf/log4j2.xml new file mode 100644 index 0000000..d203a24 --- /dev/null +++ b/conf/log4j2.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="ERROR"> + <Properties> + <Property name="LOG_DIR">./logs</Property> + </Properties> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + <RollingFile name="LogFile" fileName="${LOG_DIR}/flume.log" filePattern="${LOG_DIR}/archive/flume.log.%d{yyyyMMdd}-%i"> + <PatternLayout pattern="%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %equals{%x}{[]}{} - %m%n" /> + <Policies> + <!-- Roll every night at midnight or when the file reaches 100MB --> + <SizeBasedTriggeringPolicy size="100 MB"/> + <CronTriggeringPolicy schedule="0 0 0 * * ?"/> + </Policies> + <DefaultRolloverStrategy min="1" max="20"> + <Delete basePath="${LOG_DIR}/archive"> + <!-- Nested conditions: the inner condition is only evaluated on files for which the outer conditions are true. --> + <IfFileName glob="flume.log.*"> + <!-- Only allow 1 GB of files to accumulate --> + <IfAccumulatedFileSize exceeds="1 GB"/> + </IfFileName> + </Delete> + </DefaultRolloverStrategy> + </RollingFile> + </Appenders> + + <Loggers> + <Logger name="org.apache.flume.lifecycle" level="info"/> + <Logger name="org.jboss" level="WARN"/> + <Logger name="org.apache.avro.ipc.NettyTransceiver" level="WARN"/> + <Logger name="org.apache.hadoop" level="INFO"/> + <Logger name="org.apache.hadoop.hive" level="ERROR"/> + <Root level="INFO"> + <AppenderRef ref="LogFile" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-auth/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-auth/pom.xml b/flume-ng-auth/pom.xml index c7c682f..3f47c48 100644 --- a/flume-ng-auth/pom.xml +++ b/flume-ng-auth/pom.xml @@ -57,8 +57,23 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> </dependency> <dependency> @@ -77,6 +92,16 @@ limitations under the License. <artifactId>hadoop-minikdc</artifactId> <version>${hadoop2.version}</version> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-file-channel/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/pom.xml b/flume-ng-channels/flume-file-channel/pom.xml index 05da84d..6e580c9 100644 --- a/flume-ng-channels/flume-file-channel/pom.xml +++ b/flume-ng-channels/flume-file-channel/pom.xml @@ -91,8 +91,32 @@ </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-jcl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-file-channel/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/resources/log4j.properties b/flume-ng-channels/flume-file-channel/src/test/resources/log4j.properties deleted file mode 100644 index 739ecc8..0000000 --- a/flume-ng-channels/flume-file-channel/src/test/resources/log4j.properties +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - - -log4j.rootLogger = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-file-channel/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/resources/log4j2.xml b/flume-ng-channels/flume-file-channel/src/test/resources/log4j2.xml new file mode 100644 index 0000000..2aa49a4 --- /dev/null +++ b/flume-ng-channels/flume-file-channel/src/test/resources/log4j2.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-jdbc-channel/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-jdbc-channel/pom.xml b/flume-ng-channels/flume-jdbc-channel/pom.xml index 7370aa4..16479a4 100644 --- a/flume-ng-channels/flume-jdbc-channel/pom.xml +++ b/flume-ng-channels/flume-jdbc-channel/pom.xml @@ -74,8 +74,26 @@ limitations under the License. <artifactId>derby</artifactId> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-kafka-channel/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-kafka-channel/pom.xml b/flume-ng-channels/flume-kafka-channel/pom.xml index 6d513dc..1f4a08a 100644 --- a/flume-ng-channels/flume-kafka-channel/pom.xml +++ b/flume-ng-channels/flume-kafka-channel/pom.xml @@ -45,7 +45,6 @@ limitations under the License. <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka_2.10</artifactId> - <version>${kafka.version}</version> </dependency> <dependency> <groupId>org.apache.kafka</groupId> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j.properties b/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j.properties deleted file mode 100644 index b86600b..0000000 --- a/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j.properties +++ /dev/null @@ -1,78 +0,0 @@ -# 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. - -kafka.logs.dir=target/logs - -log4j.rootLogger=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.kafkaAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.kafkaAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.kafkaAppender.File=${kafka.logs.dir}/server.log -log4j.appender.kafkaAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.kafkaAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log -log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.requestAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.requestAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.requestAppender.File=${kafka.logs.dir}/kafka-request.log -log4j.appender.requestAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.requestAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.cleanerAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.cleanerAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.cleanerAppender.File=${kafka.logs.dir}/log-cleaner.log -log4j.appender.cleanerAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.cleanerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.controllerAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.controllerAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.controllerAppender.File=${kafka.logs.dir}/controller.log -log4j.appender.controllerAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.controllerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -# Turn on all our debugging info -#log4j.logger.kafka.producer.async.DefaultEventHandler=DEBUG, kafkaAppender -#log4j.logger.kafka.client.ClientUtils=DEBUG, kafkaAppender -#log4j.logger.kafka.perf=DEBUG, kafkaAppender -#log4j.logger.kafka.perf.ProducerPerformance$ProducerThread=DEBUG, kafkaAppender -#log4j.logger.org.I0Itec.zkclient.ZkClient=DEBUG -log4j.logger.kafka=INFO, kafkaAppender - -log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender -log4j.additivity.kafka.network.RequestChannel$=false - -#log4j.logger.kafka.network.Processor=TRACE, requestAppender -#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender -#log4j.additivity.kafka.server.KafkaApis=false -log4j.logger.kafka.request.logger=WARN, requestAppender -log4j.additivity.kafka.request.logger=false - -log4j.logger.kafka.controller=TRACE, controllerAppender -log4j.additivity.kafka.controller=false - -log4j.logger.kafka.log.LogCleaner=INFO, cleanerAppender -log4j.additivity.kafka.log.LogCleaner=false - -log4j.logger.state.change.logger=TRACE, stateChangeAppender -log4j.additivity.state.change.logger=false http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j2.xml b/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j2.xml new file mode 100644 index 0000000..1263a38 --- /dev/null +++ b/flume-ng-channels/flume-kafka-channel/src/test/resources/log4j2.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Properties> + <Property name="kafka.logs.dir">target/logs</Property> + </Properties> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + <RollingFile name="kafka" fileName="${kafka.logs.dir}/server.log"> + <PatternLayout pattern="[%d] %p %m (%c)%n" /> + <CronTriggeringPolicy schedule="0 0 0 * * ?"/> + </RollingFile> + <RollingFile name="stateChange" fileName="${kafka.logs.dir}/state-change.log"> + <PatternLayout pattern="[%d] %p %m (%c)%n" /> + <CronTriggeringPolicy schedule="0 0 0 * * ?"/> + </RollingFile> + <RollingFile name="request" fileName="${kafka.logs.dir}/kafka-request.log"> + <PatternLayout pattern="[%d] %p %m (%c)%n" /> + <CronTriggeringPolicy schedule="0 0 0 * * ?"/> + </RollingFile> + <RollingFile name="cleaner" fileName="${kafka.logs.dir}/log-cleaner.log"> + <PatternLayout pattern="[%d] %p %m (%c)%n" /> + <CronTriggeringPolicy schedule="0 0 0 * * ?"/> + </RollingFile> + <RollingFile name="controller" fileName="${kafka.logs.dir}/controller.log"> + <PatternLayout pattern="[%d] %p %m (%c)%n" /> + <CronTriggeringPolicy schedule="0 0 0 * * ?"/> + </RollingFile> + </Appenders> + + <Loggers> + <Logger name="kafka" level="info"> + <AppenderRef ref="kafka"/> + </Logger> + <Logger name="kafka.network.RequestChannel.*" level="WARN" additivity="false"> + <AppenderRef ref="request"/> + </Logger> + <Logger name="kafka.request.logger" level="WARN" additivity="false"> + <AppenderRef ref="request"/> + </Logger> + <Logger name="kafka.controller" level="TRACE" additivity="false"> + <AppenderRef ref="controller"/> + </Logger> + <Logger name="kafka.log.cleaner" level="INFO" additivity="false"> + <AppenderRef ref="cleaner"/> + </Logger> + <Logger name="state.change.logger" level="TRACE" additivity="false"> + <AppenderRef ref="stateChange"/> + </Logger> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-channels/flume-spillable-memory-channel/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-spillable-memory-channel/pom.xml b/flume-ng-channels/flume-spillable-memory-channel/pom.xml index e2ea393..29a3819 100644 --- a/flume-ng-channels/flume-spillable-memory-channel/pom.xml +++ b/flume-ng-channels/flume-spillable-memory-channel/pom.xml @@ -97,8 +97,26 @@ </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-clients/flume-ng-log4jappender/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-clients/flume-ng-log4jappender/pom.xml b/flume-ng-clients/flume-ng-log4jappender/pom.xml index 3731814..4d25c2b 100644 --- a/flume-ng-clients/flume-ng-log4jappender/pom.xml +++ b/flume-ng-clients/flume-ng-log4jappender/pom.xml @@ -67,6 +67,8 @@ limitations under the License. <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> + <version>1.2.17</version> + <scope>compile</scope> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-configuration/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-configuration/pom.xml b/flume-ng-configuration/pom.xml index 6a30840..e431fc8 100644 --- a/flume-ng-configuration/pom.xml +++ b/flume-ng-configuration/pom.xml @@ -48,8 +48,23 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-core/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-core/pom.xml b/flume-ng-core/pom.xml index 44d9ef6..3d72aba 100644 --- a/flume-ng-core/pom.xml +++ b/flume-ng-core/pom.xml @@ -301,13 +301,18 @@ limitations under the License. </dependency> <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-core/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-core/src/test/resources/log4j.properties b/flume-ng-core/src/test/resources/log4j.properties deleted file mode 100644 index 361158d..0000000 --- a/flume-ng-core/src/test/resources/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -log4j.rootLogger = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-core/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-core/src/test/resources/log4j2.xml b/flume-ng-core/src/test/resources/log4j2.xml new file mode 100644 index 0000000..5676916 --- /dev/null +++ b/flume-ng-core/src/test/resources/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Root level="DEBUG"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-dist/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-dist/pom.xml b/flume-ng-dist/pom.xml index 330118e..b3b6faa 100644 --- a/flume-ng-dist/pom.xml +++ b/flume-ng-dist/pom.xml @@ -199,11 +199,23 @@ <dependency> <groupId>org.apache.flume.flume-ng-clients</groupId> <artifactId>flume-ng-log4jappender</artifactId> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.flume.flume-ng-clients</groupId> <artifactId>flume-ng-log4jappender</artifactId> <classifier>jar-with-dependencies</classifier> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.flume</groupId> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-embedded-agent/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-embedded-agent/pom.xml b/flume-ng-embedded-agent/pom.xml index 1d65768..a99f129 100644 --- a/flume-ng-embedded-agent/pom.xml +++ b/flume-ng-embedded-agent/pom.xml @@ -69,13 +69,25 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <!-- only used for tests --> <optional>true</optional> </dependency> <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <optional>true</optional> + </dependency> + + <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-embedded-agent/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-embedded-agent/src/test/resources/log4j.properties b/flume-ng-embedded-agent/src/test/resources/log4j.properties deleted file mode 100644 index 361158d..0000000 --- a/flume-ng-embedded-agent/src/test/resources/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -log4j.rootLogger = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-embedded-agent/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-embedded-agent/src/test/resources/log4j2.xml b/flume-ng-embedded-agent/src/test/resources/log4j2.xml new file mode 100644 index 0000000..fbc44b4 --- /dev/null +++ b/flume-ng-embedded-agent/src/test/resources/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-legacy-sources/flume-avro-source/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-legacy-sources/flume-avro-source/pom.xml b/flume-ng-legacy-sources/flume-avro-source/pom.xml index e9cfab7..c5fb68e 100644 --- a/flume-ng-legacy-sources/flume-avro-source/pom.xml +++ b/flume-ng-legacy-sources/flume-avro-source/pom.xml @@ -115,8 +115,26 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-legacy-sources/flume-thrift-source/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-legacy-sources/flume-thrift-source/pom.xml b/flume-ng-legacy-sources/flume-thrift-source/pom.xml index 194e41e..ce84145 100644 --- a/flume-ng-legacy-sources/flume-thrift-source/pom.xml +++ b/flume-ng-legacy-sources/flume-thrift-source/pom.xml @@ -150,8 +150,26 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j.properties b/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j.properties deleted file mode 100644 index 9036aca..0000000 --- a/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j.properties +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - - -log4j.rootLogger = DEBUG, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j2.xml b/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j2.xml new file mode 100644 index 0000000..5676916 --- /dev/null +++ b/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Root level="DEBUG"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-node/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-node/pom.xml b/flume-ng-node/pom.xml index 6cf5364..83faadd 100644 --- a/flume-ng-node/pom.xml +++ b/flume-ng-node/pom.xml @@ -103,18 +103,18 @@ </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> </dependency> <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> </dependency> <dependency> - <groupId>log4j</groupId> - <artifactId>apache-log4j-extras</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> </dependency> <dependency> @@ -153,6 +153,12 @@ <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-node/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-node/src/test/resources/log4j.properties b/flume-ng-node/src/test/resources/log4j.properties deleted file mode 100644 index 5d38311..0000000 --- a/flume-ng-node/src/test/resources/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -log4j.rootCategory = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-node/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-node/src/test/resources/log4j2.xml b/flume-ng-node/src/test/resources/log4j2.xml new file mode 100644 index 0000000..fbc44b4 --- /dev/null +++ b/flume-ng-node/src/test/resources/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sdk/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sdk/pom.xml b/flume-ng-sdk/pom.xml index fdad52b..658abce 100644 --- a/flume-ng-sdk/pom.xml +++ b/flume-ng-sdk/pom.xml @@ -203,10 +203,27 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <!-- only used for tests --> - <optional>true</optional> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> + <scope>test</scope> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sdk/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-sdk/src/test/resources/log4j.properties b/flume-ng-sdk/src/test/resources/log4j.properties deleted file mode 100644 index 361158d..0000000 --- a/flume-ng-sdk/src/test/resources/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -log4j.rootLogger = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sdk/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sdk/src/test/resources/log4j2.xml b/flume-ng-sdk/src/test/resources/log4j2.xml new file mode 100644 index 0000000..fbc44b4 --- /dev/null +++ b/flume-ng-sdk/src/test/resources/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-dataset-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-dataset-sink/pom.xml b/flume-ng-sinks/flume-dataset-sink/pom.xml index 1b0c325..30cca81 100644 --- a/flume-ng-sinks/flume-dataset-sink/pom.xml +++ b/flume-ng-sinks/flume-dataset-sink/pom.xml @@ -125,11 +125,39 @@ limitations under the License. <artifactId>hadoop-minicluster</artifactId> <version>${hadoop2.version}</version> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-hdfs-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-hdfs-sink/pom.xml b/flume-ng-sinks/flume-hdfs-sink/pom.xml index f821be2..f51cfef 100644 --- a/flume-ng-sinks/flume-hdfs-sink/pom.xml +++ b/flume-ng-sinks/flume-hdfs-sink/pom.xml @@ -73,8 +73,26 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> @@ -187,6 +205,16 @@ limitations under the License. <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-minicluster</artifactId> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j.properties b/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j.properties deleted file mode 100644 index 252b5ea..0000000 --- a/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j.properties +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -log4j.rootLogger = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG -log4j.logger.org.apache.hadoop = WARN -log4j.logger.org.mortbay = WARN http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j2.xml b/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j2.xml new file mode 100644 index 0000000..91a23f8 --- /dev/null +++ b/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j2.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Logger name="org.apache.hadoop" level="WARN"/> + <Logger name="org.mortbay" level="WARN"/> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-hive-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-hive-sink/pom.xml b/flume-ng-sinks/flume-hive-sink/pom.xml index 7cc518e..11a97da 100644 --- a/flume-ng-sinks/flume-hive-sink/pom.xml +++ b/flume-ng-sinks/flume-hive-sink/pom.xml @@ -80,6 +80,16 @@ limitations under the License. <artifactId>hadoop-mapreduce-client-core</artifactId> <scope>test</scope> <version>${hadoop.version}</version> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> </profile> @@ -104,6 +114,16 @@ limitations under the License. <artifactId>hadoop-mapreduce-client-core</artifactId> <scope>test</scope> <version>${hadoop.version}</version> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> </profile> @@ -138,8 +158,26 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> @@ -154,12 +192,32 @@ limitations under the License. <artifactId>hive-hcatalog-core</artifactId> <scope>provided</scope> <version>${hive.version}</version> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.hive</groupId> <artifactId>hive-cli</artifactId> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <!--temporary - really belongs to hive-streaming : roshan --> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j.properties b/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j.properties deleted file mode 100644 index 252b5ea..0000000 --- a/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j.properties +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -log4j.rootLogger = INFO, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG -log4j.logger.org.apache.hadoop = WARN -log4j.logger.org.mortbay = WARN http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j2.xml b/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j2.xml new file mode 100644 index 0000000..91a23f8 --- /dev/null +++ b/flume-ng-sinks/flume-hive-sink/src/test/resources/log4j2.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Logger name="org.apache.hadoop" level="WARN"/> + <Logger name="org.mortbay" level="WARN"/> + <Root level="INFO"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-http-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-http-sink/pom.xml b/flume-ng-sinks/flume-http-sink/pom.xml index 52b038a..687a02b 100644 --- a/flume-ng-sinks/flume-http-sink/pom.xml +++ b/flume-ng-sinks/flume-http-sink/pom.xml @@ -101,8 +101,25 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-http-sink/src/main/java/org/apache/flume/sink/http/HttpSink.java ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-http-sink/src/main/java/org/apache/flume/sink/http/HttpSink.java b/flume-ng-sinks/flume-http-sink/src/main/java/org/apache/flume/sink/http/HttpSink.java index b9c42ed..8fd2e4c 100644 --- a/flume-ng-sinks/flume-http-sink/src/main/java/org/apache/flume/sink/http/HttpSink.java +++ b/flume-ng-sinks/flume-http-sink/src/main/java/org/apache/flume/sink/http/HttpSink.java @@ -27,7 +27,8 @@ import org.apache.flume.Transaction; import org.apache.flume.conf.Configurable; import org.apache.flume.instrumentation.SinkCounter; import org.apache.flume.sink.AbstractSink; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; @@ -48,7 +49,7 @@ import java.util.Map; public class HttpSink extends AbstractSink implements Configurable { /** Class logger. */ - private static final Logger LOG = Logger.getLogger(HttpSink.class); + private static final Logger LOG = LogManager.getLogger(HttpSink.class); /** Lowest valid HTTP status code. */ private static final int HTTP_STATUS_CONTINUE = 100; http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-http-sink/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-http-sink/src/test/resources/log4j.properties b/flume-ng-sinks/flume-http-sink/src/test/resources/log4j.properties deleted file mode 100644 index 783022d..0000000 --- a/flume-ng-sinks/flume-http-sink/src/test/resources/log4j.properties +++ /dev/null @@ -1,28 +0,0 @@ -/* -* 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. -*/ -log4j.rootLogger = ALL, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -log4j.appender.flume = org.apache.flume.clients.log4jappender.Log4jAppender -log4j.appender.flume.Hostname = 127.0.0.1 -log4j.appender.flume.Port = 4141 -log4j.appender.flume.layout=org.apache.log4j.PatternLayout http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-http-sink/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-http-sink/src/test/resources/log4j2.xml b/flume-ng-sinks/flume-http-sink/src/test/resources/log4j2.xml new file mode 100644 index 0000000..d539bdb --- /dev/null +++ b/flume-ng-sinks/flume-http-sink/src/test/resources/log4j2.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%m%n" /> + </Console> + </Appenders> + <Loggers> + <Root level="ALL"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-irc-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-irc-sink/pom.xml b/flume-ng-sinks/flume-irc-sink/pom.xml index f43071d..0f40c8e 100644 --- a/flume-ng-sinks/flume-irc-sink/pom.xml +++ b/flume-ng-sinks/flume-irc-sink/pom.xml @@ -73,8 +73,26 @@ limitations under the License. </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-ng-elasticsearch-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-ng-elasticsearch-sink/pom.xml b/flume-ng-sinks/flume-ng-elasticsearch-sink/pom.xml index 10bde66..1df26b8 100644 --- a/flume-ng-sinks/flume-ng-elasticsearch-sink/pom.xml +++ b/flume-ng-sinks/flume-ng-elasticsearch-sink/pom.xml @@ -68,8 +68,26 @@ </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j.properties b/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j.properties deleted file mode 100644 index 9036aca..0000000 --- a/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j.properties +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - - -log4j.rootLogger = DEBUG, out - -log4j.appender.out = org.apache.log4j.ConsoleAppender -log4j.appender.out.layout = org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n - -log4j.logger.org.apache.flume = DEBUG http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j2.xml b/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j2.xml new file mode 100644 index 0000000..5676916 --- /dev/null +++ b/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + +--> +<Configuration status="OFF"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d (%t) [%p - %l] %m%n" /> + </Console> + </Appenders> + <Loggers> + <Logger name="org.apache.flume" level="DEBUG"/> + <Root level="DEBUG"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-ng-hbase-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-ng-hbase-sink/pom.xml b/flume-ng-sinks/flume-ng-hbase-sink/pom.xml index 1184275..0f8af71 100644 --- a/flume-ng-sinks/flume-ng-hbase-sink/pom.xml +++ b/flume-ng-sinks/flume-ng-hbase-sink/pom.xml @@ -68,8 +68,26 @@ </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> <scope>test</scope> </dependency> @@ -197,12 +215,32 @@ <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-minicluster</artifactId> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> <optional>true</optional> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> @@ -236,17 +274,47 @@ <groupId>org.apache.hbase</groupId> <artifactId>hbase-common</artifactId> <optional>true</optional> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-testing-util</artifactId> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> </profile> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-ng-kafka-sink/pom.xml ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-ng-kafka-sink/pom.xml b/flume-ng-sinks/flume-ng-kafka-sink/pom.xml index e4cad81..39dd3bd 100644 --- a/flume-ng-sinks/flume-ng-kafka-sink/pom.xml +++ b/flume-ng-sinks/flume-ng-kafka-sink/pom.xml @@ -86,6 +86,30 @@ <version>${kafka.version}</version> </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> + <scope>test</scope> + </dependency> + </dependencies> </project> http://git-wip-us.apache.org/repos/asf/flume/blob/69c66efe/flume-ng-sinks/flume-ng-kafka-sink/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/flume-ng-sinks/flume-ng-kafka-sink/src/test/resources/log4j.properties b/flume-ng-sinks/flume-ng-kafka-sink/src/test/resources/log4j.properties deleted file mode 100644 index b86600b..0000000 --- a/flume-ng-sinks/flume-ng-kafka-sink/src/test/resources/log4j.properties +++ /dev/null @@ -1,78 +0,0 @@ -# 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. - -kafka.logs.dir=target/logs - -log4j.rootLogger=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.kafkaAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.kafkaAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.kafkaAppender.File=${kafka.logs.dir}/server.log -log4j.appender.kafkaAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.kafkaAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log -log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.requestAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.requestAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.requestAppender.File=${kafka.logs.dir}/kafka-request.log -log4j.appender.requestAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.requestAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.cleanerAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.cleanerAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.cleanerAppender.File=${kafka.logs.dir}/log-cleaner.log -log4j.appender.cleanerAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.cleanerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -log4j.appender.controllerAppender=org.apache.log4j.DailyRollingFileAppender -log4j.appender.controllerAppender.DatePattern='.'yyyy-MM-dd-HH -log4j.appender.controllerAppender.File=${kafka.logs.dir}/controller.log -log4j.appender.controllerAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.controllerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n - -# Turn on all our debugging info -#log4j.logger.kafka.producer.async.DefaultEventHandler=DEBUG, kafkaAppender -#log4j.logger.kafka.client.ClientUtils=DEBUG, kafkaAppender -#log4j.logger.kafka.perf=DEBUG, kafkaAppender -#log4j.logger.kafka.perf.ProducerPerformance$ProducerThread=DEBUG, kafkaAppender -#log4j.logger.org.I0Itec.zkclient.ZkClient=DEBUG -log4j.logger.kafka=INFO, kafkaAppender - -log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender -log4j.additivity.kafka.network.RequestChannel$=false - -#log4j.logger.kafka.network.Processor=TRACE, requestAppender -#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender -#log4j.additivity.kafka.server.KafkaApis=false -log4j.logger.kafka.request.logger=WARN, requestAppender -log4j.additivity.kafka.request.logger=false - -log4j.logger.kafka.controller=TRACE, controllerAppender -log4j.additivity.kafka.controller=false - -log4j.logger.kafka.log.LogCleaner=INFO, cleanerAppender -log4j.additivity.kafka.log.LogCleaner=false - -log4j.logger.state.change.logger=TRACE, stateChangeAppender -log4j.additivity.state.change.logger=false
