diff --git a/build-logic/src/main/kotlin/clusterless.java-application-conventions.gradle.kts b/build-logic/src/main/kotlin/clusterless.java-application-conventions.gradle.kts index 4578c14..485d1dc 100644 --- a/build-logic/src/main/kotlin/clusterless.java-application-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/clusterless.java-application-conventions.gradle.kts @@ -1,3 +1,6 @@ +import gradle.kotlin.dsl.accessors._4c82c8048bcef42aad7cd4b7a363d7d5.implementation +import gradle.kotlin.dsl.accessors._4c82c8048bcef42aad7cd4b7a363d7d5.runtimeOnly + /* * Copyright (c) 2023-2025 Chris K Wensel . All Rights Reserved. * @@ -7,14 +10,13 @@ */ plugins { - // Apply the common convention plugin for shared build configuration between library and application projects. id("clusterless.java-common-conventions") - - // Apply the application plugin to add support for building a CLI application in Java. application } dependencies { implementation("info.picocli:picocli") implementation("com.github.jknack:handlebars") + runtimeOnly("ch.qos.logback:logback-classic") + runtimeOnly("ch.qos.logback:logback-core") } diff --git a/build-logic/src/main/kotlin/clusterless.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/clusterless.java-common-conventions.gradle.kts index d433156..9eadef8 100644 --- a/build-logic/src/main/kotlin/clusterless.java-common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/clusterless.java-common-conventions.gradle.kts @@ -89,9 +89,8 @@ fun DependencyConstraintHandlerScope.testImplementationAndTestFixture(constraint } dependencies { - implementation("org.apache.logging.log4j:log4j-api") - implementation("org.apache.logging.log4j:log4j-core") - implementation("org.apache.logging.log4j:log4j-jul") + implementation("org.slf4j:slf4j-api") + implementation("org.jetbrains:annotations") compileOnly("javax.annotation:javax.annotation-api") @@ -110,6 +109,13 @@ dependencies { implementation("com.github.jknack:handlebars:4.4.0") // implementation("com.cronutils:cron-utils:9.2.0") + val slf4j = "2.0.16" + implementation("org.slf4j:slf4j-api:$slf4j") + val logback = "1.5.16" + implementation("ch.qos.logback:logback-classic:$logback") + implementation("ch.qos.logback:logback-core:$logback") + + // only used by lambdas // https://mvnrepository.com/artifact/org.apache.logging.log4j val log4j = "2.24.3" implementation("org.apache.logging.log4j:log4j-api:$log4j") @@ -181,7 +187,8 @@ dependencies { // https://github.com/testcontainers/testcontainers-java/issues/1442#issuecomment-694342883 testImplementationAndTestFixture("com.amazonaws:aws-java-sdk-s3:1.11.860") - testImplementationAndTestFixture("org.apache.logging.log4j:log4j-slf4j-impl:$log4j") + testImplementationAndTestFixture("ch.qos.logback:logback-classic:$logback") + testImplementationAndTestFixture("ch.qos.logback:logback-core:$logback") } } @@ -203,8 +210,6 @@ testing { implementation("uk.org.webcompere:system-stubs-core") implementation("uk.org.webcompere:system-stubs-jupiter") implementation("org.mockito:mockito-inline") - - implementation("org.apache.logging.log4j:log4j-slf4j-impl") // used by inject-resources } } diff --git a/build-logic/src/main/kotlin/clusterless.java-lambda-conventions.gradle.kts b/build-logic/src/main/kotlin/clusterless.java-lambda-conventions.gradle.kts new file mode 100644 index 0000000..b74729f --- /dev/null +++ b/build-logic/src/main/kotlin/clusterless.java-lambda-conventions.gradle.kts @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2023-2025 Chris K Wensel . All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +plugins { + id("clusterless.java-common-conventions") + `java-library` +} + +dependencies { +} diff --git a/build-logic/src/main/kotlin/clusterless.java-library-conventions.gradle.kts b/build-logic/src/main/kotlin/clusterless.java-library-conventions.gradle.kts index 0f785aa..b74729f 100644 --- a/build-logic/src/main/kotlin/clusterless.java-library-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/clusterless.java-library-conventions.gradle.kts @@ -7,9 +7,9 @@ */ plugins { - // Apply the common convention plugin for shared build configuration between library and application projects. id("clusterless.java-common-conventions") - - // Apply the java-library plugin for API and implementation separation. `java-library` } + +dependencies { +} diff --git a/clusterless-common/src/main/java/clusterless/cls/config/ConfigManager.java b/clusterless-common/src/main/java/clusterless/cls/config/ConfigManager.java index 1537b47..777f86c 100644 --- a/clusterless-common/src/main/java/clusterless/cls/config/ConfigManager.java +++ b/clusterless-common/src/main/java/clusterless/cls/config/ConfigManager.java @@ -18,8 +18,8 @@ import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.dataformat.toml.TomlMapper; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.*; import java.nio.file.Files; @@ -37,7 +37,7 @@ * */ public class ConfigManager { - private static final Logger LOG = LogManager.getLogger(ConfigManager.class); + private static final Logger LOG = LoggerFactory.getLogger(ConfigManager.class); public static final Path CURRENT_DIR = Paths.get(".").toAbsolutePath().normalize(); public static final Path HOME_DIR = Paths.get(System.getProperty("user.home")).toAbsolutePath().normalize(); public static final Path GLOBAL_CONFIG_DIR = HOME_DIR.resolve(Paths.get(".cls")); diff --git a/clusterless-main-common/build.gradle.kts b/clusterless-main-common/build.gradle.kts index e7aa872..d3ba042 100644 --- a/clusterless-main-common/build.gradle.kts +++ b/clusterless-main-common/build.gradle.kts @@ -14,6 +14,8 @@ dependencies { implementation(project(":clusterless-common")) implementation(project(":clusterless-model")) + compileOnly("ch.qos.logback:logback-classic") + implementation("io.heretical:mini-parsers-temporal") implementation("info.picocli:picocli") implementation("com.github.jknack:handlebars") diff --git a/clusterless-main-common/src/main/java/clusterless/cls/process/ProcessExec.java b/clusterless-main-common/src/main/java/clusterless/cls/process/ProcessExec.java index e77ad71..2d611ab 100644 --- a/clusterless-main-common/src/main/java/clusterless/cls/process/ProcessExec.java +++ b/clusterless-main-common/src/main/java/clusterless/cls/process/ProcessExec.java @@ -16,8 +16,7 @@ import io.github.resilience4j.retry.MaxRetriesExceededException; import io.github.resilience4j.retry.Retry; import io.github.resilience4j.retry.RetryConfig; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.time.Duration; @@ -25,7 +24,7 @@ import java.util.function.Supplier; public abstract class ProcessExec { - private static final Logger LOG = LogManager.getLogger(ProcessExec.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(ProcessExec.class); protected Supplier dryRun = () -> false; protected Supplier retry = () -> false; protected Supplier verbosity = () -> 0; diff --git a/clusterless-main-common/src/main/java/clusterless/cls/startup/Verbosity.java b/clusterless-main-common/src/main/java/clusterless/cls/startup/Verbosity.java index 60b22d1..96f97be 100644 --- a/clusterless-main-common/src/main/java/clusterless/cls/startup/Verbosity.java +++ b/clusterless-main-common/src/main/java/clusterless/cls/startup/Verbosity.java @@ -8,10 +8,13 @@ package clusterless.cls.startup; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.core.config.Configurator; +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import org.slf4j.LoggerFactory; import picocli.CommandLine; +import static org.slf4j.Logger.ROOT_LOGGER_NAME; + /** * https://picocli.info/#_use_case_configure_log_level_with_a_global_option */ @@ -23,7 +26,8 @@ public class Verbosity { private int level = 0; public static void setLoggingLevel(Level level) { - Configurator.setRootLevel(level); + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + context.getLogger(ROOT_LOGGER_NAME).setLevel(level); } public static void disable() { diff --git a/clusterless-main/src/main/java/clusterless/cls/Main.java b/clusterless-main/src/main/java/clusterless/cls/Main.java index a08384b..a50da33 100644 --- a/clusterless-main/src/main/java/clusterless/cls/Main.java +++ b/clusterless-main/src/main/java/clusterless/cls/Main.java @@ -30,9 +30,8 @@ import clusterless.cls.util.ExitCodeExceptionMapper; import clusterless.cls.util.ParameterExceptionHandler; import clusterless.cls.util.VersionProvider; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import picocli.CommandLine; import java.io.IOException; @@ -64,7 +63,7 @@ } ) public class Main extends Startup implements Callable { - private static final Logger LOG = LogManager.getLogger(Main.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Main.class); /** * This provides a global --providers predicate, but when calling a provider, we need to sort out a way diff --git a/clusterless-main/src/main/resources/log4j2.xml b/clusterless-main/src/main/resources/log4j2.xml deleted file mode 100644 index 129580f..0000000 --- a/clusterless-main/src/main/resources/log4j2.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/clusterless-main/src/main/resources/logback.xml b/clusterless-main/src/main/resources/logback.xml new file mode 100644 index 0000000..c52b96b --- /dev/null +++ b/clusterless-main/src/main/resources/logback.xml @@ -0,0 +1,19 @@ + + + + + + + + + %yellow(%d{HH:mm:ss.SSS}) %highlight(%-5level){FATAL=bg_red, ERROR=red, WARN=yellow, INFO=green} + %msg%n + + + + + + + + diff --git a/clusterless-model/src/main/java/clusterless/cls/managed/component/ComponentServices.java b/clusterless-model/src/main/java/clusterless/cls/managed/component/ComponentServices.java index f950759..1c4d5f4 100644 --- a/clusterless-model/src/main/java/clusterless/cls/managed/component/ComponentServices.java +++ b/clusterless-model/src/main/java/clusterless/cls/managed/component/ComponentServices.java @@ -14,8 +14,7 @@ import clusterless.cls.model.deploy.Deployable; import clusterless.cls.model.deploy.Extensible; import clusterless.cls.util.Annotations; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; import java.util.*; @@ -23,7 +22,7 @@ * */ public class ComponentServices { - private static final Logger LOG = LogManager.getLogger(ComponentServices.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(ComponentServices.class); public static final ComponentServices INSTANCE = new ComponentServices(); diff --git a/clusterless-model/src/main/java/clusterless/cls/managed/dataset/DatasetResolver.java b/clusterless-model/src/main/java/clusterless/cls/managed/dataset/DatasetResolver.java index ba2a86f..9fbb92e 100644 --- a/clusterless-model/src/main/java/clusterless/cls/managed/dataset/DatasetResolver.java +++ b/clusterless-model/src/main/java/clusterless/cls/managed/dataset/DatasetResolver.java @@ -11,9 +11,8 @@ import clusterless.cls.model.deploy.*; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import java.util.*; import java.util.stream.Collectors; @@ -26,7 +25,7 @@ * to declare read permissions against datasets they do not own. */ public class DatasetResolver { - private static final Logger LOG = LogManager.getLogger(DatasetResolver.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(DatasetResolver.class); private final List deployables; private final Map> resolved = new HashMap<>(); private final RemoteDatasetOwnerLookup remoteLookup; diff --git a/clusterless-scenario/build.gradle.kts b/clusterless-scenario/build.gradle.kts index ca09ba0..ea81b5e 100644 --- a/clusterless-scenario/build.gradle.kts +++ b/clusterless-scenario/build.gradle.kts @@ -64,7 +64,7 @@ dependencies { implementation("javax.validation:validation-api:2.0.1.Final") - val springBoot = "2.7.3" + val springBoot = "2.7.18" implementation("org.springframework.boot:spring-boot-starter:$springBoot") { exclude("org.springframework.boot", "spring-boot-starter-logging") } @@ -73,13 +73,25 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-actuator:$springBoot") implementation("org.springframework.retry:spring-retry:1.3.3") // 2.0.1 is on jdk 17 - implementation("org.apache.logging.log4j:log4j-web") - runtimeOnly("org.glassfish.jaxb:jaxb-runtime:2.3.3") implementation("com.google.guava:guava") } +// the current version of spring boot, used by conductor, hard codes a dependency on +// org.slf4j.impl.StaticLoggerBinder in the LogbackLoggingSystem class. +// this was removed in recent slf4j/logback releases so we must pin the scenario project +// to older versions of slf4j/logback +configurations.all { + resolutionStrategy { + force( + "org.slf4j:slf4j-api:1.7.28", + "ch.qos.logback:logback-classic:1.2.11", + "ch.qos.logback:logback-core:1.2.11" + ) + } +} + application { applicationName = "cls-scenario" mainClass.set("clusterless.scenario.Main") diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/Main.java b/clusterless-scenario/src/main/java/clusterless/scenario/Main.java index 43dc63e..6cc7d10 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/Main.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/Main.java @@ -17,9 +17,9 @@ import clusterless.scenario.model.Scenario; import com.netflix.conductor.common.metadata.tasks.Task; import com.netflix.conductor.common.run.Workflow; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.ConfigurableApplicationContext; import picocli.CommandLine; @@ -43,7 +43,7 @@ } ) public class Main implements Callable { - private static final Logger LOG = LogManager.getLogger(Main.class); + private static final Logger LOG = LoggerFactory.getLogger(Main.class); private ConfigurableApplicationContext server; diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/ConductorApp.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/ConductorApp.java index a64a101..4f0a1b0 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/ConductorApp.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/ConductorApp.java @@ -8,8 +8,8 @@ package clusterless.scenario.conductor; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @@ -19,7 +19,7 @@ @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) @ComponentScan(basePackages = {"com.netflix.conductor", "io.orkes.conductor"}) public class ConductorApp { - private static final Logger LOG = LogManager.getLogger(ConductorApp.class); + private static final Logger LOG = LoggerFactory.getLogger(ConductorApp.class); public static ConfigurableApplicationContext run(String... args) { LOG.info("Starting Conductor"); diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/BootstrapRunner.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/BootstrapRunner.java index ce7b8f4..cb97eaf 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/BootstrapRunner.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/BootstrapRunner.java @@ -15,9 +15,9 @@ import com.netflix.conductor.common.metadata.workflow.StartWorkflowRequest; import com.netflix.conductor.common.metadata.workflow.WorkflowDef; import com.netflix.conductor.common.metadata.workflow.WorkflowTask; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.nio.file.Path; import java.util.List; @@ -25,7 +25,7 @@ import java.util.Objects; public class BootstrapRunner { - private static final Logger LOG = LogManager.getLogger(BootstrapRunner.class); + private static final Logger LOG = LoggerFactory.getLogger(BootstrapRunner.class); private final Options options; private final WorkflowManager workflowManager; private final Map placement; diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/ScenarioRunner.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/ScenarioRunner.java index 898f13a..c70a283 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/ScenarioRunner.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/runner/ScenarioRunner.java @@ -24,9 +24,9 @@ import com.netflix.conductor.common.metadata.workflow.WorkflowDef; import com.netflix.conductor.common.metadata.workflow.WorkflowTask; import com.netflix.conductor.sdk.workflow.def.tasks.*; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.time.Duration; import java.util.LinkedList; @@ -34,7 +34,7 @@ import java.util.Map; public class ScenarioRunner { - private static final Logger LOG = LogManager.getLogger(ScenarioRunner.class); + private static final Logger LOG = LoggerFactory.getLogger(ScenarioRunner.class); private final Options options; private final WorkflowManager workflowManager; private final Scenario scenario; diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/S3IngressWorker.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/S3IngressWorker.java index 22d591a..6b06780 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/S3IngressWorker.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/S3IngressWorker.java @@ -17,8 +17,8 @@ import com.netflix.conductor.client.worker.Worker; import com.netflix.conductor.common.metadata.tasks.Task; import com.netflix.conductor.common.metadata.tasks.TaskResult; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.Map; @@ -26,7 +26,7 @@ import java.util.stream.IntStream; public class S3IngressWorker implements Worker { - private static final Logger LOG = LogManager.getLogger(S3IngressWorker.class); + private static final Logger LOG = LoggerFactory.getLogger(S3IngressWorker.class); protected final Options options; diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/WatcherWorker.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/WatcherWorker.java index 4f6ebe8..d851044 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/WatcherWorker.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/aws/WatcherWorker.java @@ -14,15 +14,15 @@ import com.netflix.conductor.client.worker.Worker; import com.netflix.conductor.common.metadata.tasks.Task; import com.netflix.conductor.common.metadata.tasks.TaskResult; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.Map; import java.util.concurrent.*; public abstract class WatcherWorker implements Worker { - private static final Logger LOG = LogManager.getLogger(S3WatcherWorker.class); + private static final Logger LOG = LoggerFactory.getLogger(WatcherWorker.class); protected final Options options; public WatcherWorker(Options options) { diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessBootstrapWorker.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessBootstrapWorker.java index 5975e2e..d523ec1 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessBootstrapWorker.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessBootstrapWorker.java @@ -13,14 +13,14 @@ import com.netflix.conductor.client.worker.Worker; import com.netflix.conductor.common.metadata.tasks.Task; import com.netflix.conductor.common.metadata.tasks.TaskResult; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Map; import java.util.Objects; public abstract class ClusterlessBootstrapWorker implements Worker { - private static final Logger LOG = LogManager.getLogger(ClusterlessBootstrapWorker.class); + private static final Logger LOG = LoggerFactory.getLogger(ClusterlessBootstrapWorker.class); protected final Options options; private final boolean destroy; diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessProjectWorker.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessProjectWorker.java index 998d529..7ea860f 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessProjectWorker.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/ClusterlessProjectWorker.java @@ -13,15 +13,15 @@ import com.netflix.conductor.client.worker.Worker; import com.netflix.conductor.common.metadata.tasks.Task; import com.netflix.conductor.common.metadata.tasks.TaskResult; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.List; import java.util.Map; import java.util.Objects; public abstract class ClusterlessProjectWorker implements Worker { - private static final Logger LOG = LogManager.getLogger(ClusterlessProjectWorker.class); + private static final Logger LOG = LoggerFactory.getLogger(ClusterlessProjectWorker.class); private final String command; protected final Options options; private final String[] extraArgs; diff --git a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/exec/BaseClusterlessExecutor.java b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/exec/BaseClusterlessExecutor.java index ec0a721..16ce89a 100644 --- a/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/exec/BaseClusterlessExecutor.java +++ b/clusterless-scenario/src/main/java/clusterless/scenario/conductor/worker/cli/exec/BaseClusterlessExecutor.java @@ -9,8 +9,7 @@ package clusterless.scenario.conductor.worker.cli.exec; import clusterless.cls.startup.Startup; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.nio.file.Files; @@ -19,7 +18,7 @@ import java.util.*; public abstract class BaseClusterlessExecutor { - private static final Logger LOG = LogManager.getLogger(ClusterlessProjectExecutor.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(ClusterlessProjectExecutor.class); private static final Map properties = new LinkedHashMap<>(); static { diff --git a/clusterless-substrate-aws-common/build.gradle.kts b/clusterless-substrate-aws-common/build.gradle.kts index 4ab255b..83cedaa 100644 --- a/clusterless-substrate-aws-common/build.gradle.kts +++ b/clusterless-substrate-aws-common/build.gradle.kts @@ -7,7 +7,7 @@ */ plugins { - id("clusterless.java-library-conventions") + id("clusterless.java-lambda-conventions") } dependencies { @@ -31,6 +31,4 @@ dependencies { implementation("software.amazon.awssdk:glue") implementation("software.amazon.awssdk:athena") implementation("software.amazon.awssdk:cloudwatchlogs") - - implementation("org.apache.logging.log4j:log4j-slf4j-impl") // awssdk } diff --git a/clusterless-substrate-aws-common/src/main/java/clusterless/cls/substrate/aws/sdk/ClientBase.java b/clusterless-substrate-aws-common/src/main/java/clusterless/cls/substrate/aws/sdk/ClientBase.java index 02f5187..9b83417 100644 --- a/clusterless-substrate-aws-common/src/main/java/clusterless/cls/substrate/aws/sdk/ClientBase.java +++ b/clusterless-substrate-aws-common/src/main/java/clusterless/cls/substrate/aws/sdk/ClientBase.java @@ -9,9 +9,8 @@ package clusterless.cls.substrate.aws.sdk; import com.google.common.base.Throwables; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider; import software.amazon.awssdk.awscore.AwsClient; import software.amazon.awssdk.awscore.AwsResponse; @@ -36,7 +35,7 @@ * */ public abstract class ClientBase { - private static final Logger LOG = LogManager.getLogger(ClientBase.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(ClientBase.class); protected static final boolean localStackEnabled = Boolean.getBoolean("clusterless.localstack.enabled"); protected static final String defaultRegion = Optional.ofNullable(System.getenv("AWS_REGION")).orElse(System.getenv("AWS_DEFAULT_REGION")); protected static final String defaultProfile = System.getenv("AWS_PROFILE"); diff --git a/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/construct/ExtensibleConstruct.java b/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/construct/ExtensibleConstruct.java index c329bc4..aba7fac 100644 --- a/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/construct/ExtensibleConstruct.java +++ b/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/construct/ExtensibleConstruct.java @@ -13,9 +13,8 @@ import clusterless.cls.substrate.aws.managed.ManagedConstruct; import clusterless.cls.substrate.aws.util.ErrorsUtil; import clusterless.commons.naming.Label; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.services.glue.alpha.ITable; import software.amazon.awscdk.services.glue.alpha.Table; import software.amazon.awscdk.services.glue.alpha.TableAttributes; @@ -31,7 +30,7 @@ * */ public class ExtensibleConstruct extends ManagedConstruct { - private static final Logger LOG = LogManager.getLogger(ExtensibleConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(ExtensibleConstruct.class); private final Map buckets = new HashMap<>(); // cache the construct to prevent collisions private final Map tables = new HashMap<>(); // cache the construct to prevent collisions diff --git a/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/resources/Vpcs.java b/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/resources/Vpcs.java index f72d69a..d3cc48d 100644 --- a/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/resources/Vpcs.java +++ b/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/resources/Vpcs.java @@ -11,9 +11,8 @@ import clusterless.cls.substrate.aws.managed.ManagedComponentContext; import clusterless.commons.naming.Ref; import clusterless.commons.substrate.aws.cdk.naming.ResourceNames; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.Fn; import software.amazon.awscdk.services.ec2.IVpc; import software.amazon.awscdk.services.ec2.Vpc; @@ -23,7 +22,7 @@ import java.util.Objects; public class Vpcs { - private static final Logger LOG = LogManager.getLogger(Vpcs.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Vpcs.class); public static final String COMMON_VPC = "CommonVpc"; public static final String VPC = "vpc"; diff --git a/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/util/ErrorsUtil.java b/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/util/ErrorsUtil.java index 164ea5d..9e278bc 100644 --- a/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/util/ErrorsUtil.java +++ b/clusterless-substrate-aws-construct-common/src/main/java/clusterless/cls/substrate/aws/util/ErrorsUtil.java @@ -8,8 +8,7 @@ package clusterless.cls.substrate.aws.util; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.util.Strings; +import org.slf4j.Logger; import software.constructs.IConstruct; import java.util.function.Supplier; @@ -28,7 +27,7 @@ public static R construct(String expectedType, Supplier { - private static final Logger LOG = LogManager.getLogger(CloudWatchExportActivityConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(CloudWatchExportActivityConstruct.class); public CloudWatchExportActivityConstruct(@NotNull ManagedComponentContext context, @NotNull CloudWatchExportActivity model) { super(context, model); diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/arc/batch/BatchExecArcConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/arc/batch/BatchExecArcConstruct.java index 844bd1c..63fc947 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/arc/batch/BatchExecArcConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/arc/batch/BatchExecArcConstruct.java @@ -18,9 +18,8 @@ import clusterless.cls.substrate.aws.resources.Policies; import clusterless.commons.naming.Label; import clusterless.commons.substrate.aws.cdk.naming.ResourceNames; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.Duration; import software.amazon.awscdk.RemovalPolicy; import software.amazon.awscdk.Size; @@ -42,7 +41,7 @@ import java.util.stream.Collectors; public class BatchExecArcConstruct extends ArcConstruct { - private static final Logger LOG = LogManager.getLogger(BatchExecArcConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(BatchExecArcConstruct.class); private final Label regionalName; private final RetentionDays retentionDays = RetentionDays.ONE_DAY; private final RemovalPolicy removalPolicy = RemovalPolicy.DESTROY; diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/FrequentS3PutStrategyBoundaryConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/FrequentS3PutStrategyBoundaryConstruct.java index d4628c0..aa867bb 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/FrequentS3PutStrategyBoundaryConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/FrequentS3PutStrategyBoundaryConstruct.java @@ -23,9 +23,8 @@ import clusterless.commons.substrate.aws.cdk.construct.LambdaLogGroupConstruct; import clusterless.commons.substrate.aws.cdk.scoped.ScopedStack; import clusterless.commons.temporal.IntervalUnits; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.Duration; import software.amazon.awscdk.RemovalPolicy; import software.amazon.awscdk.services.events.*; @@ -48,7 +47,7 @@ * */ public class FrequentS3PutStrategyBoundaryConstruct extends ExtensibleConstruct { - private static final Logger LOG = LogManager.getLogger(FrequentS3PutStrategyBoundaryConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(FrequentS3PutStrategyBoundaryConstruct.class); public FrequentS3PutStrategyBoundaryConstruct(@NotNull ManagedComponentContext context, @NotNull S3PutListenerBoundary model) { super(context, model, Label.of("Frequent").with(model.name())); diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/InfrequentS3PutStrategyBoundaryConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/InfrequentS3PutStrategyBoundaryConstruct.java index 2a9f223..bd9032d 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/InfrequentS3PutStrategyBoundaryConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/InfrequentS3PutStrategyBoundaryConstruct.java @@ -25,9 +25,8 @@ import clusterless.commons.substrate.aws.cdk.construct.LambdaLogGroupConstruct; import clusterless.commons.substrate.aws.cdk.scoped.ScopedStack; import clusterless.commons.temporal.IntervalUnits; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.Duration; import software.amazon.awscdk.services.events.EventBus; import software.amazon.awscdk.services.events.EventPattern; @@ -48,7 +47,7 @@ * */ public class InfrequentS3PutStrategyBoundaryConstruct extends ExtensibleConstruct { - private static final Logger LOG = LogManager.getLogger(InfrequentS3PutStrategyBoundaryConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(InfrequentS3PutStrategyBoundaryConstruct.class); public InfrequentS3PutStrategyBoundaryConstruct(@NotNull ManagedComponentContext context, @NotNull S3PutListenerBoundary model) { super(context, model, Label.of("Infrequent").with(model.name())); diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/S3PutListenerBoundaryConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/S3PutListenerBoundaryConstruct.java index aa596a4..c687c52 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/S3PutListenerBoundaryConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/boundary/s3put/S3PutListenerBoundaryConstruct.java @@ -10,15 +10,14 @@ import clusterless.cls.substrate.aws.construct.IngressBoundaryConstruct; import clusterless.cls.substrate.aws.managed.ManagedComponentContext; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; /** * */ public class S3PutListenerBoundaryConstruct extends IngressBoundaryConstruct { - private static final Logger LOG = LogManager.getLogger(S3PutListenerBoundaryConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(S3PutListenerBoundaryConstruct.class); public S3PutListenerBoundaryConstruct(@NotNull ManagedComponentContext context, @NotNull S3PutListenerBoundary model) { super(context, model); diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/database/GlueDatabaseResourceConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/database/GlueDatabaseResourceConstruct.java index 840add6..7c298d7 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/database/GlueDatabaseResourceConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/database/GlueDatabaseResourceConstruct.java @@ -13,9 +13,8 @@ import clusterless.cls.substrate.aws.managed.ManagedComponentContext; import clusterless.cls.substrate.aws.util.TagsUtil; import clusterless.commons.naming.Label; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.RemovalPolicy; import software.amazon.awscdk.services.glue.alpha.Database; @@ -23,7 +22,7 @@ * */ public class GlueDatabaseResourceConstruct extends ResourceConstruct { - private static final Logger LOG = LogManager.getLogger(GlueDatabaseResourceConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(GlueDatabaseResourceConstruct.class); public GlueDatabaseResourceConstruct(@NotNull ManagedComponentContext context, @NotNull GlueDatabaseResource model) { super(context, model, Label.of(model.databaseName())); diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/table/GlueTableResourceConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/table/GlueTableResourceConstruct.java index 6a079a8..a5f82b7 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/table/GlueTableResourceConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/glue/table/GlueTableResourceConstruct.java @@ -14,9 +14,8 @@ import clusterless.cls.substrate.aws.util.TagsUtil; import clusterless.cls.util.URIs; import clusterless.commons.naming.Label; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.RemovalPolicy; import software.amazon.awscdk.services.glue.alpha.*; import software.amazon.awscdk.services.s3.IBucket; @@ -29,7 +28,7 @@ * */ public class GlueTableResourceConstruct extends ResourceConstruct { - private static final Logger LOG = LogManager.getLogger(GlueTableResourceConstruct.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(GlueTableResourceConstruct.class); public GlueTableResourceConstruct(@NotNull ManagedComponentContext context, @NotNull GlueTableResource model) { super(context, model, Label.of(model.tableName())); diff --git a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/s3/S3BucketResourceConstruct.java b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/s3/S3BucketResourceConstruct.java index f96de11..d712945 100644 --- a/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/s3/S3BucketResourceConstruct.java +++ b/clusterless-substrate-aws-construct-core/src/main/java/clusterless/cls/substrate/aws/resource/s3/S3BucketResourceConstruct.java @@ -14,9 +14,9 @@ import clusterless.cls.substrate.aws.resources.Buckets; import clusterless.cls.substrate.aws.util.TagsUtil; import clusterless.commons.naming.Label; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.RemovalPolicy; import software.amazon.awscdk.services.s3.BlockPublicAccess; import software.amazon.awscdk.services.s3.Bucket; @@ -28,7 +28,7 @@ * */ public class S3BucketResourceConstruct extends ResourceConstruct { - private static final Logger LOG = LogManager.getLogger(S3BucketResourceConstruct.class); + private static final Logger LOG = LoggerFactory.getLogger(S3BucketResourceConstruct.class); private final IBucket bucket; public S3BucketResourceConstruct(@NotNull ManagedComponentContext context, @NotNull S3BucketResource model) { diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/Kernel.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/Kernel.java index a9685cf..58cef27 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/Kernel.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/Kernel.java @@ -28,8 +28,7 @@ import clusterless.cls.substrate.aws.report.Projects; import clusterless.cls.util.ExecutionExceptionHandler; import clusterless.cls.util.ExitCodeExceptionMapper; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; import picocli.CommandLine; import java.util.Arrays; @@ -59,7 +58,7 @@ } ) public class Kernel extends Startup implements SubstrateProvider { - private static final Logger LOG = LogManager.getLogger(Kernel.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Kernel.class); public static void main(String[] args) { System.exit(new Kernel().execute(args)); diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/CDKProcessExec.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/CDKProcessExec.java index b6e0ee0..7a53b6b 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/CDKProcessExec.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/CDKProcessExec.java @@ -19,9 +19,8 @@ import clusterless.commons.collection.OrderedSafeMaps; import clusterless.commons.collection.SafeList; import com.google.common.base.Joiner; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import picocli.CommandLine; import java.io.File; @@ -46,7 +45,7 @@ * (default: cdk.out) [string] */ public class CDKProcessExec extends ProcessExec { - private static final Logger LOG = LogManager.getLogger(CDKProcessExec.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(CDKProcessExec.class); public static final String CLS_CDK_COMMAND = "CLS_CDK_COMMAND"; public static final String CLS_CDK_OUTPUT_PATH = "CLS_CDK_OUTPUT_PATH"; public static final String CLS_CDK_PROFILE = "CLS_CDK_PROFILE"; diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/Bootstrap.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/Bootstrap.java index 826e1c1..cdd7365 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/Bootstrap.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/Bootstrap.java @@ -19,8 +19,7 @@ import clusterless.commons.collection.OrderedSafeMaps; import clusterless.commons.naming.Stage; import clusterless.commons.util.Strings; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; import picocli.CommandLine; import software.amazon.awscdk.AppProps; import software.amazon.awscdk.Environment; @@ -42,7 +41,7 @@ name = "bootstrap" ) public class Bootstrap extends BaseCDKCommand implements Callable { - private static final Logger LOG = LogManager.getLogger(Bootstrap.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Bootstrap.class); @CommandLine.Mixin BootstrapCommandOptions commandOptions = new BootstrapCommandOptions(); @CommandLine.Mixin diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/BootstrapStack.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/BootstrapStack.java index 92fc9c3..55e6841 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/BootstrapStack.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/BootstrapStack.java @@ -17,9 +17,8 @@ import clusterless.commons.naming.Ref; import clusterless.commons.substrate.aws.cdk.scoped.ScopedApp; import clusterless.commons.substrate.aws.cdk.scoped.ScopedStack; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.Environment; import software.amazon.awscdk.RemovalPolicy; import software.amazon.awscdk.StackProps; @@ -44,7 +43,7 @@ * - ImageRepositoryName */ public class BootstrapStack extends ScopedStack { - private static final Logger LOG = LogManager.getLogger(BootstrapStack.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(BootstrapStack.class); public BootstrapStack(@NotNull ScopedApp app, @NotNull StackProps props) { super(app, "ClusterlessBootstrapStack", props); diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/vpc/VPCConstruct.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/vpc/VPCConstruct.java index 66296f0..da414f6 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/vpc/VPCConstruct.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/bootstrap/vpc/VPCConstruct.java @@ -11,9 +11,9 @@ import clusterless.cls.substrate.aws.managed.Managed; import clusterless.cls.substrate.aws.resources.Vpcs; import clusterless.commons.substrate.aws.cdk.naming.ResourceNames; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awscdk.services.ec2.IpAddresses; import software.amazon.awscdk.services.ec2.SubnetConfiguration; import software.amazon.awscdk.services.ec2.SubnetType; @@ -23,7 +23,7 @@ import java.util.Collections; public class VPCConstruct extends Construct implements Managed { - private static final Logger LOG = LogManager.getLogger(VPCConstruct.class); + private static final Logger LOG = LoggerFactory.getLogger(VPCConstruct.class); private final Vpc vpc; private final String vpcName; diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Lifecycle.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Lifecycle.java index 5136a9f..99f5931 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Lifecycle.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Lifecycle.java @@ -32,9 +32,8 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.collect.LinkedListMultimap; import com.google.common.collect.Multimap; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.LoggerFactory; import software.constructs.Construct; import java.io.File; @@ -47,7 +46,7 @@ * */ public class Lifecycle { - private static final Logger LOG = LogManager.getLogger(Lifecycle.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Lifecycle.class); ComponentServices componentServices = ComponentServices.INSTANCE; StackGroups stackGroups = new StackGroups(); diff --git a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Synth.java b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Synth.java index 6ce28c1..c35f021 100644 --- a/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Synth.java +++ b/clusterless-substrate-aws-kernel/src/main/java/clusterless/cls/substrate/aws/cdk/lifecycle/Synth.java @@ -15,8 +15,7 @@ import clusterless.cls.substrate.aws.cdk.CDKProcessExec; import clusterless.cls.substrate.aws.meta.Metadata; import clusterless.cls.substrate.aws.util.TagsUtil; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.LoggerFactory; import picocli.CommandLine; import java.io.IOException; @@ -28,7 +27,7 @@ hidden = true ) public class Synth extends BaseCDKCommand implements Callable { - private static final Logger LOG = LogManager.getLogger(Synth.class); + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Synth.class); @CommandLine.Mixin ProjectCommandOptions commandOptions = new ProjectCommandOptions(); Lifecycle lifecycle = new Lifecycle(); diff --git a/clusterless-substrate-aws-lambda-arc/build.gradle.kts b/clusterless-substrate-aws-lambda-arc/build.gradle.kts index af3231e..84ee70d 100644 --- a/clusterless-substrate-aws-lambda-arc/build.gradle.kts +++ b/clusterless-substrate-aws-lambda-arc/build.gradle.kts @@ -7,7 +7,7 @@ */ plugins { - id("clusterless.java-library-conventions") + id("clusterless.java-lambda-conventions") } dependencies { diff --git a/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateManager.java b/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateManager.java index 923e108..bdb37fe 100644 --- a/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateManager.java +++ b/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateManager.java @@ -12,8 +12,8 @@ import clusterless.cls.model.state.ArcState; import clusterless.cls.substrate.aws.sdk.S3; import clusterless.cls.substrate.uri.ArcStateURI; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.LinkedList; @@ -23,7 +23,7 @@ import java.util.stream.Collectors; public class ArcStateManager { - private static final Logger LOG = LogManager.getLogger(ArcStateManager.class); + private static final Logger LOG = LoggerFactory.getLogger(ArcStateManager.class); private final S3 s3 = new S3(); final ArcStateURI arcStatePath; diff --git a/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateStartHandler.java b/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateStartHandler.java index 3785275..1d345f9 100644 --- a/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateStartHandler.java +++ b/clusterless-substrate-aws-lambda-arc/src/main/java/clusterless/aws/lambda/arc/ArcStateStartHandler.java @@ -15,8 +15,8 @@ import clusterless.cls.substrate.aws.event.ArcWorkloadContext; import clusterless.cls.util.Env; import com.amazonaws.services.lambda.runtime.Context; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.List; import java.util.Map; @@ -27,7 +27,7 @@ * Converts an ArcNotifyEvent into an ArcStateContext for use within the state machine. */ public class ArcStateStartHandler extends StreamResultHandler { - private static final Logger LOG = LogManager.getLogger(ArcStateStartHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(ArcStateStartHandler.class); protected static final ArcStateProps arcStateProps = Env.fromEnv( ArcStateProps.class, () -> ArcStateProps.builder() diff --git a/clusterless-substrate-aws-lambda-common/build.gradle.kts b/clusterless-substrate-aws-lambda-common/build.gradle.kts index 3d582b3..4fba3ab 100644 --- a/clusterless-substrate-aws-lambda-common/build.gradle.kts +++ b/clusterless-substrate-aws-lambda-common/build.gradle.kts @@ -7,7 +7,7 @@ */ plugins { - id("clusterless.java-library-conventions") + id("clusterless.java-lambda-conventions") } dependencies { diff --git a/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/StreamResultHandler.java b/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/StreamResultHandler.java index a178aa1..64cf70e 100644 --- a/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/StreamResultHandler.java +++ b/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/StreamResultHandler.java @@ -14,9 +14,9 @@ import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectReader; import com.fasterxml.jackson.databind.ObjectWriter; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessageFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; @@ -28,7 +28,7 @@ * */ public abstract class StreamResultHandler implements RequestStreamHandler { - private static final Logger LOG = LogManager.getLogger(StreamResultHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(StreamResultHandler.class); /** * Use the same message format as log4j. */ diff --git a/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/arc/ArcNotifyEventPublisher.java b/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/arc/ArcNotifyEventPublisher.java index 4a845a7..735cba8 100644 --- a/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/arc/ArcNotifyEventPublisher.java +++ b/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/arc/ArcNotifyEventPublisher.java @@ -11,8 +11,8 @@ import clusterless.cls.model.deploy.SinkDataset; import clusterless.cls.substrate.aws.event.ArcNotifyEvent; import clusterless.cls.substrate.aws.sdk.EventBus; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.Map; @@ -20,7 +20,7 @@ import java.util.stream.Collectors; public class ArcNotifyEventPublisher { - private static final Logger LOG = LogManager.getLogger(ArcNotifyEventPublisher.class); + private static final Logger LOG = LoggerFactory.getLogger(ArcNotifyEventPublisher.class); private final EventBus eventBus = new EventBus(); private final String eventBusName; private final SinkDataset dataset; @@ -48,11 +48,19 @@ public void publishEvent(String lotId, URI manifestURI) { .build(); if (!dataset.publish()) { - LOG.info("skipping publish of {} on {}", () -> notifyEvent.getClass().getSimpleName(), () -> eventBusName); + LOG.atInfo() + .setMessage("skipping publish of {} on {}") + .addArgument(() -> notifyEvent.getClass().getSimpleName()) + .addArgument(() -> eventBusName) + .log(); return; } - LOG.info("publishing {} on {}", () -> notifyEvent.getClass().getSimpleName(), () -> eventBusName); + LOG.atInfo() + .setMessage("publishing {} on {}") + .addArgument(() -> notifyEvent.getClass().getSimpleName()) + .addArgument(() -> eventBusName) + .log(); EventBus.Response response = eventBus.put(eventBusName, notifyEvent); diff --git a/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/manifest/ManifestWriter.java b/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/manifest/ManifestWriter.java index e8f5cdf..4dfe5f6 100644 --- a/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/manifest/ManifestWriter.java +++ b/clusterless-substrate-aws-lambda-common/src/main/java/clusterless/aws/lambda/manifest/ManifestWriter.java @@ -14,8 +14,8 @@ import clusterless.cls.model.manifest.ManifestState; import clusterless.cls.substrate.aws.sdk.S3; import clusterless.cls.substrate.uri.ManifestURI; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.Collections; @@ -24,7 +24,7 @@ import java.util.Map; public class ManifestWriter { - private static final Logger LOG = LogManager.getLogger(ManifestWriter.class); + private static final Logger LOG = LoggerFactory.getLogger(ManifestWriter.class); private final S3 s3 = new S3(); private final ManifestURI sinkManifestPath; @@ -84,7 +84,11 @@ private URI writeManifest(List uris, String lotId, ManifestURI sinkManifest ManifestExistsException::new ); - LOG.info("writing {} to path: {}", () -> manifest.getClass().getSimpleName(), () -> sinkManifestIdentifier); + LOG.atInfo() + .setMessage("writing {} to path: {}") + .addArgument(() -> manifest.getClass().getSimpleName()) + .addArgument(() -> sinkManifestIdentifier) + .log(); S3.Response response = s3.put(sinkManifestIdentifier, manifest.contentType(), manifest); diff --git a/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/BootstrapMachine.java b/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/BootstrapMachine.java index c4a98bb..efd763e 100644 --- a/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/BootstrapMachine.java +++ b/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/BootstrapMachine.java @@ -12,14 +12,14 @@ import clusterless.cls.substrate.aws.sdk.Glue; import clusterless.cls.substrate.aws.sdk.S3; import clusterless.cls.substrate.aws.sdk.SQS; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.glue.model.Column; import java.util.List; public class BootstrapMachine { - private static final Logger LOG = LogManager.getLogger(BootstrapMachine.class); + private static final Logger LOG = LoggerFactory.getLogger(BootstrapMachine.class); S3 s3 = new S3(); EventBus eventBus = new EventBus(); SQS sqs = new SQS(); diff --git a/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/CreateDataMachine.java b/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/CreateDataMachine.java index 8690099..00d9d13 100644 --- a/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/CreateDataMachine.java +++ b/clusterless-substrate-aws-lambda-common/src/testFixtures/java/clusterless/aws/lambda/CreateDataMachine.java @@ -16,15 +16,15 @@ import clusterless.cls.substrate.aws.sdk.S3; import clusterless.cls.substrate.uri.ManifestURI; import clusterless.cls.util.URIs; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.util.*; import java.util.stream.Collectors; public class CreateDataMachine { - private static final Logger LOG = LogManager.getLogger(CreateDataMachine.class); + private static final Logger LOG = LoggerFactory.getLogger(CreateDataMachine.class); S3 s3 = new S3(); List lots = new LinkedList<>(); diff --git a/clusterless-substrate-aws-lambda-transform/build.gradle.kts b/clusterless-substrate-aws-lambda-transform/build.gradle.kts index 6da23f8..da49b17 100644 --- a/clusterless-substrate-aws-lambda-transform/build.gradle.kts +++ b/clusterless-substrate-aws-lambda-transform/build.gradle.kts @@ -7,7 +7,7 @@ */ plugins { - id("clusterless.java-library-conventions") + id("clusterless.java-lambda-conventions") id("org.openapi.generator") version "6.6.0" } diff --git a/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/activity/cloudwatch/CloudWatchExportActivityHandler.java b/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/activity/cloudwatch/CloudWatchExportActivityHandler.java index 418607c..6e0bf1a 100644 --- a/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/activity/cloudwatch/CloudWatchExportActivityHandler.java +++ b/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/activity/cloudwatch/CloudWatchExportActivityHandler.java @@ -16,8 +16,8 @@ import clusterless.commons.temporal.IntervalBuilder; import com.amazonaws.services.lambda.runtime.Context; import com.google.common.base.Stopwatch; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.cloudwatchlogs.CloudWatchLogsClient; import software.amazon.awssdk.services.cloudwatchlogs.model.LimitExceededException; @@ -27,7 +27,7 @@ import java.time.OffsetDateTime; public class CloudWatchExportActivityHandler extends EventHandler { - private static final Logger LOG = LogManager.getLogger(CloudWatchExportActivityHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(CloudWatchExportActivityHandler.class); protected final CloudWatchExportActivityProps activityProps = Env.fromEnv( CloudWatchExportActivityProps.class, () -> CloudWatchExportActivityProps.builder() diff --git a/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/frequents3put/FrequentPutEventBoundaryHandler.java b/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/frequents3put/FrequentPutEventBoundaryHandler.java index 6bf3141..ccf94b6 100644 --- a/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/frequents3put/FrequentPutEventBoundaryHandler.java +++ b/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/frequents3put/FrequentPutEventBoundaryHandler.java @@ -24,8 +24,8 @@ import com.amazonaws.services.lambda.runtime.serialization.PojoSerializer; import com.amazonaws.services.lambda.runtime.serialization.events.LambdaEventSerializers; import com.google.common.base.Stopwatch; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.sqs.model.Message; import software.amazon.awssdk.services.sqs.model.MessageSystemAttributeName; @@ -42,7 +42,7 @@ import static software.amazon.awssdk.utils.StringUtils.isEmpty; public class FrequentPutEventBoundaryHandler extends EventHandler { - private static final Logger LOG = LogManager.getLogger(FrequentPutEventBoundaryHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(FrequentPutEventBoundaryHandler.class); public static final PojoSerializer serializer = LambdaEventSerializers.serializerFor(S3Event.class, S3Event.class.getClassLoader()); protected final SQS sqs = new SQS(); protected final FrequentS3PutBoundaryProps transformProps = Env.fromEnv( diff --git a/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/s3put/PutEventBoundaryHandler.java b/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/s3put/PutEventBoundaryHandler.java index 0d81e98..4f9002c 100644 --- a/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/s3put/PutEventBoundaryHandler.java +++ b/clusterless-substrate-aws-lambda-transform/src/main/java/clusterless/aws/lambda/boundary/s3put/PutEventBoundaryHandler.java @@ -18,8 +18,8 @@ import clusterless.cls.util.Env; import clusterless.commons.temporal.IntervalBuilder; import com.amazonaws.services.lambda.runtime.Context; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.URI; import java.time.OffsetDateTime; @@ -30,7 +30,7 @@ * */ public class PutEventBoundaryHandler extends EventHandler { - private static final Logger LOG = LogManager.getLogger(PutEventBoundaryHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(PutEventBoundaryHandler.class); protected static final S3 s3 = new S3(); protected final S3PutBoundaryProps transformProps = Env.fromEnv( diff --git a/clusterless-substrate-aws-lambda-workload/build.gradle.kts b/clusterless-substrate-aws-lambda-workload/build.gradle.kts index 5e34891..4ce9d02 100644 --- a/clusterless-substrate-aws-lambda-workload/build.gradle.kts +++ b/clusterless-substrate-aws-lambda-workload/build.gradle.kts @@ -7,7 +7,7 @@ */ plugins { - id("clusterless.java-library-conventions") + id("clusterless.java-lambda-conventions") } dependencies { diff --git a/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/glue/GlueAddPartitionsArcEventHandler.java b/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/glue/GlueAddPartitionsArcEventHandler.java index 4602f5d..5b09406 100644 --- a/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/glue/GlueAddPartitionsArcEventHandler.java +++ b/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/glue/GlueAddPartitionsArcEventHandler.java @@ -24,9 +24,9 @@ import com.amazonaws.services.lambda.runtime.Context; import com.google.common.collect.Iterables; import com.google.common.collect.Streams; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.glue.model.Table; import java.net.URI; @@ -41,7 +41,7 @@ * */ public class GlueAddPartitionsArcEventHandler extends ArcEventHandler { - private static final Logger LOG = LogManager.getLogger(GlueAddPartitionsArcEventHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(GlueAddPartitionsArcEventHandler.class); protected static Glue glue = new Glue(); protected static final AttemptCounter attemptCounter = new AttemptCounter(); diff --git a/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/s3copy/S3CopyArcEventHandler.java b/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/s3copy/S3CopyArcEventHandler.java index 13ed2b6..935a5f3 100644 --- a/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/s3copy/S3CopyArcEventHandler.java +++ b/clusterless-substrate-aws-lambda-workload/src/main/java/clusterless/aws/lambda/workload/s3copy/S3CopyArcEventHandler.java @@ -26,8 +26,8 @@ import clusterless.cls.util.Tuple3; import clusterless.cls.util.URIs; import com.amazonaws.services.lambda.runtime.Context; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.s3.S3Client; import java.net.URI; @@ -37,7 +37,7 @@ * */ public class S3CopyArcEventHandler extends ArcEventHandler { - private static final Logger LOG = LogManager.getLogger(S3CopyArcEventHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(S3CopyArcEventHandler.class); protected static final S3 s3 = new S3(); protected static final AttemptCounter attemptCounter = new AttemptCounter();