Skip to content

Commit

Permalink
[log4j] rolling back log4j2 to restore Java6 support (#315)
Browse files Browse the repository at this point in the history
* Revert "Revert "[pom] log4j: bump to 2.13.2." (#311)"

This reverts commit 3e22553.

* Revert "[pom] log4j: bump to 2.13.2. (#309)"

This reverts commit 951b944.

* Revert "[log4j] migrate to log4j2 (#258) (#305)"

This reverts commit 032edaa.
  • Loading branch information
truthbk authored Aug 29, 2020
1 parent 0137c98 commit 3af88ba
Show file tree
Hide file tree
Showing 30 changed files with 464 additions and 370 deletions.
20 changes: 9 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ matrix:
fast_finish: true
include:
- jdk: oraclejdk8
env:
env:
- DESC="Oracle JDK8 linting"
- CMD="mvn verify -B -Dhttps.protocols=TLSv1.2 -DskipTests -Dlog4j.configuration=log4j2.travis.properties"
- CMD="mvn verify -B -Dhttps.protocols=TLSv1.2 -DskipTests -Dlog4j.configuration=log4j.travis.properties"

- jdk: oraclejdk8
env:
env:
- DESC="Oracle JDK8 testing"
- CMD="mvn test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dlog4j.configurationFile=log4j2.travis.properties"
- CMD="mvn test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dlog4j.configuration=log4j.travis.properties"

- jdk: oraclejdk7
env:
env:
- DESC="Oracle JDK7 testing"
- CMD="mvn test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dlog4j.configurationFile=log4j2.travis.properties"
- CMD="mvn test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dlog4j.configuration=log4j.travis.properties"

- jdk: openjdk7
env:
env:
- DESC="OpenJDK7 testing"
- CMD="mvn test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dlog4j.configurationFile=log4j2.travis.properties"
- CMD="mvn test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dlog4j.configuration=log4j.travis.properties"

script: echo "Running $DESC..." && (eval $CMD)
script: echo "Running $DESC..." && (eval $CMD)

after_failure:
- for log in target/surefire-reports/*.txt; do echo "$log ========================" ; cat $log ; done
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ mvn checkstyle::check

`Checkstyle` analysis is automatically executed prior to compiling the code, testing.

# Generated code

JMXFetch uses [Lombok](https://projectlombok.org/) to modify classes and generate additional code at runtime.
You may need to [enable annotation processors](https://projectlombok.org/setup/overview) to compile in your IDE.

# Testing

To run unit test, issue the following command:
Expand Down
8 changes: 8 additions & 0 deletions log4j.travis.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
log4j.rootLogger=INFO,stdout
log4j.logger.com.endeca=INFO
# Logger for crawl metrics
log4j.logger.com.endeca.itl.web.metrics=INFO

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%p\t%d{ISO8601}\t%r\t%c\t[%t]\t%m%n
9 changes: 0 additions & 9 deletions log4j2.travis.properties

This file was deleted.

24 changes: 3 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
<guava.version>27.1-android</guava.version> <!-- From the docs: If you need support for JDK 1.7 or Android, use the Android flavor. -->
<java-dogstatsd-client.version>2.1.0</java-dogstatsd-client.version>
<jcommander.version>1.35</jcommander.version>
<!-- log4j 2.13+ drops support for Java 7, so stick to 2.12 -->
<log4j.version>2.12.1</log4j.version>
<slf4j.version>1.7.26</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<jackson.version>2.10.0</jackson.version>
<snakeyaml.version>1.13</snakeyaml.version>
<!-- Note: using project checkstyle with AOSP style
Expand Down Expand Up @@ -123,19 +121,8 @@
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<exclusions>
<exclusion>
Expand All @@ -152,11 +139,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
Expand Down
Loading

0 comments on commit 3af88ba

Please sign in to comment.