Skip to content

Commit

Permalink
Upgrade aws-lambda-java-log4j2 to 1.5.0 to upgrade log4j2 to 2.17.0 (a…
Browse files Browse the repository at this point in the history
…wslabs#166)

* upgrade aws-lambda-java-log4j2 to 1.5.0 to upgrade log4j2 to 2.17.0

* apply logging standardization across all connected modules

* Upgrade log4j2 to 2.17.1 and aws-lambda-java-log4j to 1.5.1

* exclude log4j-core and api from lambda logging, use from log4j-slf4j-impl

* Remove explicit log4j-slf4j-impl from custom-resources

* Move log4j-slf4j-impl to layers parent and mark as provided to avoid class conflict

Co-authored-by: PoeppingT <[email protected]>
  • Loading branch information
PoeppingT and PoeppingT authored Jan 5, 2022
1 parent 8241dee commit fe3bf7c
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 154 deletions.
6 changes: 0 additions & 6 deletions functions/alb-update/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions functions/ecs-deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions functions/ecs-service-update/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions functions/ecs-shutdown-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions functions/ecs-startup-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions functions/onboarding-notification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
Expand Down
6 changes: 0 additions & 6 deletions functions/system-rest-api-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
</dependencies>
</project>
15 changes: 0 additions & 15 deletions installer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,6 @@ limitations under the License.
<version>3.12.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>cloudformation</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions layers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,12 @@
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
5 changes: 0 additions & 5 deletions layers/utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ limitations under the License.
</build>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions metering-billing/lambdas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions metrics-analytics/metrics-java-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ limitations under the License.
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
28 changes: 26 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<!-- TODO upgrade to surefire 3 on release? -->
<surefire.version>2.22.2</surefire.version>
<!-- dependency versions -->
<slf4j-api.version>1.7.21</slf4j-api.version>
<slf4j-log4j12.version>1.7.21</slf4j-log4j12.version>
<!-- aws-lambda-java-log4j2 and log4j versions should be upgraded in tandem -->
<aws-lambda-java-log4j2.version>1.5.1</aws-lambda-java-log4j2.version>
<aws.java.sdk.version>2.17.70</aws.java.sdk.version>
<log4j.version>2.17.1</log4j.version>
<junit.version>4.13.2</junit.version>
</properties>
<dependencyManagement>
Expand All @@ -47,8 +48,31 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>${aws-lambda-java-log4j2.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- log4j-slf4j-impl brings in its own version of the slf4j-api -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package</defaultGoal>
<!-- this defines default plugin configuration when referenced by all inheriting modules -->
Expand Down
6 changes: 0 additions & 6 deletions resources/custom-resources/cidr-dynamodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions resources/custom-resources/clear-s3-bucket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions resources/custom-resources/fsx-dns-name/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions resources/custom-resources/rds-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions resources/custom-resources/rds-options/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions resources/custom-resources/redshift-table/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.amazon.redshift/redshift-jdbc42 -->
<dependency>
Expand Down
6 changes: 0 additions & 6 deletions services/metric-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions services/onboarding-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions services/quotas-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions services/settings-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions services/tenant-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
6 changes: 0 additions & 6 deletions services/user-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ limitations under the License.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down

0 comments on commit fe3bf7c

Please sign in to comment.