File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
src/main/java/com/aws/greengrass Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 70
70
<dependency >
71
71
<groupId >ch.qos.logback</groupId >
72
72
<artifactId >logback-classic</artifactId >
73
- <version >1.3.7 </version >
73
+ <version >1.3.13 </version >
74
74
</dependency >
75
75
<dependency >
76
76
<groupId >com.github.spotbugs</groupId >
Original file line number Diff line number Diff line change 12
12
import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
13
13
import lombok .Getter ;
14
14
import org .slf4j .event .Level ;
15
+ import org .slf4j .impl .StaticMDCBinder ;
15
16
16
17
import java .nio .file .Paths ;
17
18
import java .util .Optional ;
@@ -37,6 +38,8 @@ public static LogConfig getRootLogConfig() {
37
38
@ SuppressFBWarnings ("MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR" )
38
39
protected LogConfig () {
39
40
super (LOG_FILE_EXTENSION , LOGS_DIRECTORY );
41
+ // Must set an MDC adapter for 1.3.8+. https://github.com/qos-ch/logback/issues/709
42
+ context .setMDCAdapter (StaticMDCBinder .SINGLETON .getMDCA ());
40
43
reconfigure (context .getLogger (Logger .ROOT_LOGGER_NAME ));
41
44
startContext ();
42
45
}
Original file line number Diff line number Diff line change 17
17
import lombok .Getter ;
18
18
import lombok .Setter ;
19
19
import org .slf4j .event .Level ;
20
+ import org .slf4j .impl .StaticMDCBinder ;
20
21
21
22
import java .nio .file .Path ;
22
23
import java .nio .file .Paths ;
@@ -47,6 +48,8 @@ public class TelemetryConfig extends PersistenceConfig {
47
48
@ SuppressFBWarnings ("MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR" )
48
49
private TelemetryConfig () {
49
50
super (CONFIG_PREFIX );
51
+ // Must set an MDC adapter for 1.3.8+. https://github.com/qos-ch/logback/issues/709
52
+ context .setMDCAdapter (StaticMDCBinder .SINGLETON .getMDCA ());
50
53
boolean metricsEnabled = DEFAULT_METRICS_SWITCH ;
51
54
String enabledStr = System .getProperty (METRICS_SWITCH_KEY );
52
55
if (enabledStr != null ) {
You can’t perform that action at this time.
0 commit comments