This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new e975adb3e1 Add capability to set the localstack log level
e975adb3e1 is described below

commit e975adb3e1b06869035c21806220594829f0f80f
Author: James Netherton <[email protected]>
AuthorDate: Tue Aug 13 11:48:09 2024 +0100

    Add capability to set the localstack log level
    
    Fixes #5544
---
 .../apache/camel/quarkus/test/support/aws2/Aws2TestResource.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
 
b/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
index 932dd3f247..a86fdf4f36 100644
--- 
a/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
+++ 
b/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
@@ -65,6 +65,11 @@ public final class Aws2TestResource implements 
QuarkusTestResourceLifecycleManag
         if (usingMockBackend) {
             MockBackendUtils.logMockBackendUsed();
 
+            String localstackLogLevel = 
System.getProperty("localstack.log.level", 
System.getenv("LOCALSTACK_LOG_LEVEL"));
+            if (localstackLogLevel == null) {
+                localstackLogLevel = "info";
+            }
+
             final Service[] services = customizers.stream()
                     .map(Aws2TestEnvCustomizer::localstackServices)
                     .flatMap((Service[] ss) -> Stream.of(ss))
@@ -82,6 +87,7 @@ public final class Aws2TestResource implements 
QuarkusTestResourceLifecycleManag
                     .asCompatibleSubstituteFor("localstack/localstack");
             LocalStackContainer localstack = new LocalStackContainer(imageName)
                     .withServices(services);
+            localstack.withEnv("LS_LOG", localstackLogLevel);
             localstack.withEnv("LAMBDA_EXECUTOR", "local");
             localstack.withLogConsumer(new Slf4jLogConsumer(LOG));
             localstack.start();

Reply via email to