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
01c270d5
Commit
01c270d5
authored
Jun 18, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-22011
parents
cd47bece
ce907b12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
DefaultLogbackConfiguration.java
...ork/boot/logging/logback/DefaultLogbackConfiguration.java
+2
-1
LogbackLoggingSystemTests.java
...ework/boot/logging/logback/LogbackLoggingSystemTests.java
+1
-0
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DefaultLogbackConfiguration.java
View file @
01c270d5
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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.
...
@@ -139,6 +139,7 @@ class DefaultLogbackConfiguration {
...
@@ -139,6 +139,7 @@ class DefaultLogbackConfiguration {
private
void
setRollingPolicy
(
RollingFileAppender
<
ILoggingEvent
>
appender
,
LogbackConfigurator
config
,
private
void
setRollingPolicy
(
RollingFileAppender
<
ILoggingEvent
>
appender
,
LogbackConfigurator
config
,
String
logFile
)
{
String
logFile
)
{
SizeAndTimeBasedRollingPolicy
<
ILoggingEvent
>
rollingPolicy
=
new
SizeAndTimeBasedRollingPolicy
<>();
SizeAndTimeBasedRollingPolicy
<
ILoggingEvent
>
rollingPolicy
=
new
SizeAndTimeBasedRollingPolicy
<>();
rollingPolicy
.
setContext
(
config
.
getContext
());
rollingPolicy
.
setCleanHistoryOnStart
(
rollingPolicy
.
setCleanHistoryOnStart
(
this
.
patterns
.
getProperty
(
"logging.file.clean-history-on-start"
,
Boolean
.
class
,
false
));
this
.
patterns
.
getProperty
(
"logging.file.clean-history-on-start"
,
Boolean
.
class
,
false
));
rollingPolicy
.
setFileNamePattern
(
rollingPolicy
.
setFileNamePattern
(
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java
View file @
01c270d5
...
@@ -111,6 +111,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
...
@@ -111,6 +111,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
this
.
loggingSystem
.
initialize
(
this
.
initializationContext
,
null
,
getLogFile
(
null
,
tmpDir
()));
this
.
loggingSystem
.
initialize
(
this
.
initializationContext
,
null
,
getLogFile
(
null
,
tmpDir
()));
this
.
logger
.
info
(
"Hello world"
);
this
.
logger
.
info
(
"Hello world"
);
File
file
=
new
File
(
tmpDir
()
+
"/spring.log"
);
File
file
=
new
File
(
tmpDir
()
+
"/spring.log"
);
assertThat
(
output
).
doesNotContain
(
"LOGBACK:"
);
assertThat
(
output
).
contains
(
"Hello world"
).
doesNotContain
(
"Hidden"
);
assertThat
(
output
).
contains
(
"Hello world"
).
doesNotContain
(
"Hidden"
);
assertThat
(
getLineWithText
(
output
,
"Hello world"
)).
contains
(
"INFO"
);
assertThat
(
getLineWithText
(
output
,
"Hello world"
)).
contains
(
"INFO"
);
assertThat
(
file
.
exists
()).
isTrue
();
assertThat
(
file
.
exists
()).
isTrue
();
...
...
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