Skip to content

Commit

Permalink
chore: upgrade to greengrass logging 2.2.0 (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
indougnito authored Sep 6, 2023
1 parent aa40ed5 commit 74e1f5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<dependency>
<groupId>com.aws.greengrass</groupId>
<artifactId>logging</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -663,9 +663,12 @@
</excludes>
</filter>
<filter>
<!--
We implement our own SLF4J provider, so exclude the default provider from logback-classic.
-->
<artifact>ch.qos.logback:logback-classic:jar:*</artifact>
<excludes>
<exclude>org/slf4j/impl/StaticLoggerBinder.class</exclude>
<exclude>META-INF/services/org.slf4j.spi.SLF4JServiceProvider</exclude>
</excludes>
</filter>
<!-- We provide our own SdkTlsSocketFactory to support ALPN, so make sure not to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.aws.greengrass.lifecyclemanager;

import ch.qos.logback.core.util.SimpleInvocationGate;
import com.aws.greengrass.config.ChildChanged;
import com.aws.greengrass.config.Configuration;
import com.aws.greengrass.config.Topic;
Expand Down Expand Up @@ -162,9 +163,9 @@ void GIVEN_mock_service_logger_WHEN_file_size_limit_reached_THEN_rollover() thro
// Should rotate this time
logRandomMessages(componentLogger, 525, LogFormat.TEXT);
logRandomMessages(greengrassLogger, 525, LogFormat.TEXT);
// Rollover is guarded by ch.qos.logback.core.util.DefaultInvocationGate so that it's not invoked too soon/often
// Rollover is guarded by ch.qos.logback.core.util.SimpleInvocationGate so that it's not invoked too soon/often
// This is the minimum delay since startup for it to allow log rollover.
Thread.sleep(850);
Thread.sleep(SimpleInvocationGate.DEFAULT_INCREMENT);
componentLogger.atInfo().log(); // log once more to trigger roll over
greengrassLogger.atInfo().log(); // log once more to trigger roll over

Expand Down

0 comments on commit 74e1f5f

Please sign in to comment.