Skip to content

Commit

Permalink
Revert "chore: upgrade to greengrass logging 2.2.0 (#1509)" (#1527)
Browse files Browse the repository at this point in the history
This reverts commit 74e1f5f.
  • Loading branch information
junfuchen99 authored Sep 28, 2023
1 parent 2f80803 commit ea517c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 2 additions & 5 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.2.0-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -663,12 +663,9 @@
</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>META-INF/services/org.slf4j.spi.SLF4JServiceProvider</exclude>
<exclude>org/slf4j/impl/StaticLoggerBinder.class</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,7 +5,6 @@

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 @@ -163,9 +162,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.SimpleInvocationGate so that it's not invoked too soon/often
// Rollover is guarded by ch.qos.logback.core.util.DefaultInvocationGate so that it's not invoked too soon/often
// This is the minimum delay since startup for it to allow log rollover.
Thread.sleep(SimpleInvocationGate.DEFAULT_INCREMENT);
Thread.sleep(850);
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 ea517c6

Please sign in to comment.