Skip to content

Commit 85c5c94

Browse files
committed
Merge branch '3.3.x'
See gh-41892
2 parents c9833d7 + e7af34a commit 85c5c94

File tree

6 files changed

+4
-15
lines changed

6 files changed

+4
-15
lines changed

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ bom {
11411141
releaseNotes("https://github.com/apache/logging-log4j2/releases/tag/rel%2F{version}")
11421142
}
11431143
}
1144-
library("Logback", "1.5.7") {
1144+
library("Logback", "1.5.6") {
11451145
group("ch.qos.logback") {
11461146
modules = [
11471147
"logback-classic",

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DefaultLogbackConfiguration.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.springframework.boot.logging.logback;
1818

1919
import java.nio.charset.Charset;
20-
import java.util.concurrent.locks.ReentrantLock;
2120

2221
import ch.qos.logback.classic.Level;
2322
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
@@ -52,7 +51,6 @@
5251
* @author Scott Frederick
5352
* @author Jonatan Ivanov
5453
* @author Moritz Halbritter
55-
* @author Mark Chesney
5654
*/
5755
class DefaultLogbackConfiguration {
5856

@@ -82,9 +80,7 @@ class DefaultLogbackConfiguration {
8280
}
8381

8482
void apply(LogbackConfigurator config) {
85-
ReentrantLock lock = config.getConfigurationLock();
86-
lock.lock();
87-
try {
83+
synchronized (config.getConfigurationLock()) {
8884
defaults(config);
8985
Appender<ILoggingEvent> consoleAppender = consoleAppender(config);
9086
if (this.logFile != null) {
@@ -95,9 +91,6 @@ void apply(LogbackConfigurator config) {
9591
config.root(Level.INFO, consoleAppender);
9692
}
9793
}
98-
finally {
99-
lock.unlock();
100-
}
10194
}
10295

10396
private void defaults(LogbackConfigurator config) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackConfigurator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818

1919
import java.util.HashMap;
2020
import java.util.Map;
21-
import java.util.concurrent.locks.ReentrantLock;
2221

2322
import ch.qos.logback.classic.Level;
2423
import ch.qos.logback.classic.Logger;
@@ -50,7 +49,7 @@ LoggerContext getContext() {
5049
return this.context;
5150
}
5251

53-
ReentrantLock getConfigurationLock() {
52+
Object getConfigurationLock() {
5453
return this.context.getConfigurationLock();
5554
}
5655

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemParallelInitializationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class LogbackLoggingSystemParallelInitializationTests {
4545
void cleanUp() {
4646
this.loggingSystem.cleanUp();
4747
((LoggerContext) LoggerFactory.getILoggerFactory()).stop();
48-
((LoggerContext) LoggerFactory.getILoggerFactory()).reset();
4948
}
5049

5150
@Test

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ void cleanUp() {
127127
System.getProperties().keySet().retainAll(this.systemPropertyNames);
128128
this.loggingSystem.cleanUp();
129129
((LoggerContext) LoggerFactory.getILoggerFactory()).stop();
130-
((LoggerContext) LoggerFactory.getILoggerFactory()).reset();
131130
}
132131

133132
@Test

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ void setup(CapturedOutput output) {
7272
@AfterEach
7373
void reset() {
7474
this.context.stop();
75-
this.context.reset();
7675
new BasicConfigurator().configure((LoggerContext) LoggerFactory.getILoggerFactory());
7776
}
7877

0 commit comments

Comments
 (0)