Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
2835085f
Commit
2835085f
authored
Jun 10, 2021
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
28abcf88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
31 deletions
+4
-31
JavaLoggingSystem.java
.../springframework/boot/logging/java/JavaLoggingSystem.java
+2
-11
Log4J2LoggingSystem.java
...ingframework/boot/logging/log4j2/Log4J2LoggingSystem.java
+1
-10
LogbackLoggingSystem.java
...gframework/boot/logging/logback/LogbackLoggingSystem.java
+1
-10
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/java/JavaLoggingSystem.java
View file @
2835085f
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -164,7 +164,7 @@ public class JavaLoggingSystem extends AbstractLoggingSystem {
...
@@ -164,7 +164,7 @@ public class JavaLoggingSystem extends AbstractLoggingSystem {
@Override
@Override
public
Runnable
getShutdownHandler
()
{
public
Runnable
getShutdownHandler
()
{
return
new
ShutdownHandler
();
return
()
->
LogManager
.
getLogManager
().
reset
();
}
}
@Override
@Override
...
@@ -172,15 +172,6 @@ public class JavaLoggingSystem extends AbstractLoggingSystem {
...
@@ -172,15 +172,6 @@ public class JavaLoggingSystem extends AbstractLoggingSystem {
this
.
configuredLoggers
.
clear
();
this
.
configuredLoggers
.
clear
();
}
}
private
static
final
class
ShutdownHandler
implements
Runnable
{
@Override
public
void
run
()
{
LogManager
.
getLogManager
().
reset
();
}
}
/**
/**
* {@link LoggingSystemFactory} that returns {@link JavaLoggingSystem} if possible.
* {@link LoggingSystemFactory} that returns {@link JavaLoggingSystem} if possible.
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java
View file @
2835085f
...
@@ -301,7 +301,7 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
...
@@ -301,7 +301,7 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@Override
@Override
public
Runnable
getShutdownHandler
()
{
public
Runnable
getShutdownHandler
()
{
return
new
ShutdownHandler
();
return
()
->
getLoggerContext
().
stop
();
}
}
@Override
@Override
...
@@ -341,15 +341,6 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
...
@@ -341,15 +341,6 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
loggerContext
.
setExternalContext
(
null
);
loggerContext
.
setExternalContext
(
null
);
}
}
private
final
class
ShutdownHandler
implements
Runnable
{
@Override
public
void
run
()
{
getLoggerContext
().
stop
();
}
}
/**
/**
* {@link LoggingSystemFactory} that returns {@link Log4J2LoggingSystem} if possible.
* {@link LoggingSystemFactory} that returns {@link Log4J2LoggingSystem} if possible.
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java
View file @
2835085f
...
@@ -281,7 +281,7 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
...
@@ -281,7 +281,7 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
@Override
@Override
public
Runnable
getShutdownHandler
()
{
public
Runnable
getShutdownHandler
()
{
return
new
ShutdownHandler
();
return
()
->
getLoggerContext
().
stop
();
}
}
private
ch
.
qos
.
logback
.
classic
.
Logger
getLogger
(
String
name
)
{
private
ch
.
qos
.
logback
.
classic
.
Logger
getLogger
(
String
name
)
{
...
@@ -328,15 +328,6 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
...
@@ -328,15 +328,6 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
loggerContext
.
removeObject
(
LoggingSystem
.
class
.
getName
());
loggerContext
.
removeObject
(
LoggingSystem
.
class
.
getName
());
}
}
private
final
class
ShutdownHandler
implements
Runnable
{
@Override
public
void
run
()
{
getLoggerContext
().
stop
();
}
}
/**
/**
* {@link LoggingSystemFactory} that returns {@link LogbackLoggingSystem} if possible.
* {@link LoggingSystemFactory} that returns {@link LogbackLoggingSystem} if possible.
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment