Repository: incubator-pirk Updated Branches: refs/heads/master ba0673b2a -> 374d86c34
[hotfix]: added apache-rat-plugin version to suppress build warnings - closes apache/incubator-pirk#21 Project: http://git-wip-us.apache.org/repos/asf/incubator-pirk/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-pirk/commit/374d86c3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-pirk/tree/374d86c3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-pirk/diff/374d86c3 Branch: refs/heads/master Commit: 374d86c34bb3d8e17b3493d67d6c1533864afc92 Parents: ba0673b Author: smarthi <[email protected]> Authored: Sat Jul 23 19:58:51 2016 -0400 Committer: eawilliams <[email protected]> Committed: Sat Jul 23 19:58:51 2016 -0400 ---------------------------------------------------------------------- pom.xml | 31 ++++++++----- src/main/resources/log4j2.properties | 57 ++++++++++++++++++++++++ src/main/resources/logging/log4j.properties | 57 ------------------------ src/main/resources/pirk.properties | 2 +- 4 files changed, 77 insertions(+), 70 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/374d86c3/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index df70d9c..ec9471e 100644 --- a/pom.xml +++ b/pom.xml @@ -72,16 +72,19 @@ </repositories> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - <scala.version>2.10.4</scala.version> - <jmh.version>1.11.3</jmh.version> - <benchmarkjar.name>benchmarks</benchmarkjar.name> - <javac.target>1.7</javac.target> - <slf4j.version>1.7.21</slf4j.version> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.7</maven.compiler.source> + <maven.compiler.target>1.7</maven.compiler.target> + <scala.version>2.10.4</scala.version> + <jmh.version>1.11.3</jmh.version> + <benchmarkjar.name>benchmarks</benchmarkjar.name> + <javac.target>1.7</javac.target> + <slf4j.version>1.7.21</slf4j.version> + <log4j2.version>2.6.2</log4j2.version> + <junit.version>4.12</junit.version> + <log4j.configuration>log4j2.properties</log4j.configuration> + </properties> <dependencies> <dependency> @@ -209,6 +212,9 @@ <redirectTestOutputToFile>true</redirectTestOutputToFile> <argLine combine.children="append">-Xmx1G -Djava.net.preferIPv4Stack=true</argLine> + <systemPropertyVariables> + <log4j.configuration>${log4j.configuration}</log4j.configuration> + </systemPropertyVariables> </configuration> <dependencies> <dependency> @@ -277,14 +283,15 @@ </configuration> </execution> - <!-- in the version with benchmarks (pom-with-benchmarks.xml), this - is where that <execution></execution> lives --> + <!-- in the version with benchmarks (pom-with-benchmarks.xml), this + is where that <execution></execution> lives --> </executions> </plugin> <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> + <version>0.11</version> <configuration> <excludes> <exclude>nb-configuration.xml</exclude> <!-- courtesy excludes for netbeans users --> http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/374d86c3/src/main/resources/log4j2.properties ---------------------------------------------------------------------- diff --git a/src/main/resources/log4j2.properties b/src/main/resources/log4j2.properties new file mode 100755 index 0000000..e07107b --- /dev/null +++ b/src/main/resources/log4j2.properties @@ -0,0 +1,57 @@ +############################################################################### +# 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. +############################################################################### +# Pirk Log4j Properties file + +# Logging levels in order of verboseness: trace, debug, info, warn, error, fatal +log4j.rootLogger=info, stdout, rolling +#log4j.rootLogger=debug, stdout, rolling +#log4j.rootLogger=trace, debug, info, stdout, rolling +#log4j.rootLogger=debug, info, stdout, rolling + +# Example of adding a specific package/class at a different +#log4j.category.responder.wideskies=debug + + +# BEGIN APPENDER: CONSOLE APPENDER (stdout) +# first: type of appender (fully qualified class name) +log4j.appender.stdout=org.apache.log4j.ConsoleAppender + +# second: Any configuration information needed for that appender. +# Many appenders require a layout. +# log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +# Pattern to output the caller's file name and line number. +log4j.appender.stdout.layout.ConversionPattern=%5p [%t] %d (%F:%L) - %m%n + + +# BEGIN APPENDER: ROLLING FILE APPENDER (rolling) +# first: type of appender (fully qualified class name) +log4j.appender.rolling=org.apache.log4j.RollingFileAppender +log4j.appender.rolling.File=./logs/aip.log +log4j.appender.rolling.MaxFileSize=1MB +# number of backups to keep +log4j.appender.rolling.MaxBackupIndex=2 + +log4j.appender.rolling.layout=org.apache.log4j.PatternLayout +log4j.appender.rolling.layout.ConversionPattern=%d %-5p %-17c{2} %3x - %m%n + +log4j.logger.org.apache.zookeeper=error +log4j.logger.org.apache.hadoop.hbase=info +log4j.logger.org.apache.hadoop.hbase.zookeeper=warn + http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/374d86c3/src/main/resources/logging/log4j.properties ---------------------------------------------------------------------- diff --git a/src/main/resources/logging/log4j.properties b/src/main/resources/logging/log4j.properties deleted file mode 100755 index e07107b..0000000 --- a/src/main/resources/logging/log4j.properties +++ /dev/null @@ -1,57 +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. -############################################################################### -# Pirk Log4j Properties file - -# Logging levels in order of verboseness: trace, debug, info, warn, error, fatal -log4j.rootLogger=info, stdout, rolling -#log4j.rootLogger=debug, stdout, rolling -#log4j.rootLogger=trace, debug, info, stdout, rolling -#log4j.rootLogger=debug, info, stdout, rolling - -# Example of adding a specific package/class at a different -#log4j.category.responder.wideskies=debug - - -# BEGIN APPENDER: CONSOLE APPENDER (stdout) -# first: type of appender (fully qualified class name) -log4j.appender.stdout=org.apache.log4j.ConsoleAppender - -# second: Any configuration information needed for that appender. -# Many appenders require a layout. -# log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -# Pattern to output the caller's file name and line number. -log4j.appender.stdout.layout.ConversionPattern=%5p [%t] %d (%F:%L) - %m%n - - -# BEGIN APPENDER: ROLLING FILE APPENDER (rolling) -# first: type of appender (fully qualified class name) -log4j.appender.rolling=org.apache.log4j.RollingFileAppender -log4j.appender.rolling.File=./logs/aip.log -log4j.appender.rolling.MaxFileSize=1MB -# number of backups to keep -log4j.appender.rolling.MaxBackupIndex=2 - -log4j.appender.rolling.layout=org.apache.log4j.PatternLayout -log4j.appender.rolling.layout.ConversionPattern=%d %-5p %-17c{2} %3x - %m%n - -log4j.logger.org.apache.zookeeper=error -log4j.logger.org.apache.hadoop.hbase=info -log4j.logger.org.apache.hadoop.hbase.zookeeper=warn - http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/374d86c3/src/main/resources/pirk.properties ---------------------------------------------------------------------- diff --git a/src/main/resources/pirk.properties b/src/main/resources/pirk.properties index cf2054f..49367cb 100755 --- a/src/main/resources/pirk.properties +++ b/src/main/resources/pirk.properties @@ -22,7 +22,7 @@ ## # Name of log4j properties file (relative to current folder) -log4jPropertiesFile=logging/log4j.properties +log4jPropertiesFile=logging/log4j2.properties #Name of the local properties file - used when running with the #hadoop jar command
