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
a0d7d521
Commit
a0d7d521
authored
Sep 16, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Add ROLLING_FILE_NAME_PATTERN for File Appender"
See gh-18151
parent
4a3810a0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
9 deletions
+8
-9
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+1
-1
LoggingSystemProperties.java
...springframework/boot/logging/LoggingSystemProperties.java
+2
-1
DefaultLogbackConfiguration.java
...ork/boot/logging/logback/DefaultLogbackConfiguration.java
+0
-1
LogbackLoggingSystem.java
...gframework/boot/logging/logback/LogbackLoggingSystem.java
+0
-1
additional-spring-configuration-metadata.json
...es/META-INF/additional-spring-configuration-metadata.json
+1
-1
LoggingSystemPropertiesTests.java
...gframework/boot/logging/LoggingSystemPropertiesTests.java
+1
-1
LogbackConfigurationTests.java
...ework/boot/logging/logback/LogbackConfigurationTests.java
+2
-2
LogbackLoggingSystemTests.java
...ework/boot/logging/logback/LogbackLoggingSystemTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
a0d7d521
...
@@ -1777,7 +1777,7 @@ To help with the customization, some other properties are transferred from the S
...
@@ -1777,7 +1777,7 @@ To help with the customization, some other properties are transferred from the S
| `logging.pattern.rolling-file-name`
| `logging.pattern.rolling-file-name`
| `ROLLING_FILE_NAME_PATTERN`
| `ROLLING_FILE_NAME_PATTERN`
| Pattern
to use when roll-over log fil
es (default `$\{LOG_FILE}.%d\{yyyy-MM-dd}.%i.gz`).
| Pattern
for rolled-over log file nam
es (default `$\{LOG_FILE}.%d\{yyyy-MM-dd}.%i.gz`).
(Only supported with the default Logback setup.)
(Only supported with the default Logback setup.)
| `PID`
| `PID`
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java
View file @
a0d7d521
...
@@ -97,7 +97,8 @@ public class LoggingSystemProperties {
...
@@ -97,7 +97,8 @@ public class LoggingSystemProperties {
public
static
final
String
LOG_DATEFORMAT_PATTERN
=
"LOG_DATEFORMAT_PATTERN"
;
public
static
final
String
LOG_DATEFORMAT_PATTERN
=
"LOG_DATEFORMAT_PATTERN"
;
/**
/**
* The name of the System property that contains the rolled-over log file pattern.
* The name of the System property that contains the rolled-over log file name
* pattern.
*/
*/
public
static
final
String
ROLLING_FILE_NAME_PATTERN
=
"ROLLING_FILE_NAME_PATTERN"
;
public
static
final
String
ROLLING_FILE_NAME_PATTERN
=
"ROLLING_FILE_NAME_PATTERN"
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DefaultLogbackConfiguration.java
View file @
a0d7d521
...
@@ -47,7 +47,6 @@ import org.springframework.util.unit.DataSize;
...
@@ -47,7 +47,6 @@ import org.springframework.util.unit.DataSize;
* @author Madhura Bhave
* @author Madhura Bhave
* @author Vedran Pavic
* @author Vedran Pavic
* @author Robert Thornton
* @author Robert Thornton
* @author Eddú Meléndez
*/
*/
class
DefaultLogbackConfiguration
{
class
DefaultLogbackConfiguration
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java
View file @
a0d7d521
...
@@ -61,7 +61,6 @@ import org.springframework.util.StringUtils;
...
@@ -61,7 +61,6 @@ import org.springframework.util.StringUtils;
* @author Dave Syer
* @author Dave Syer
* @author Andy Wilkinson
* @author Andy Wilkinson
* @author Ben Hale
* @author Ben Hale
* @author Eddú Meléndez
* @since 1.0.0
* @since 1.0.0
*/
*/
public
class
LogbackLoggingSystem
extends
Slf4JLoggingSystem
{
public
class
LogbackLoggingSystem
extends
Slf4JLoggingSystem
{
...
...
spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json
View file @
a0d7d521
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
{
{
"name"
:
"logging.pattern.rolling-file-name"
,
"name"
:
"logging.pattern.rolling-file-name"
,
"type"
:
"java.lang.String"
,
"type"
:
"java.lang.String"
,
"description"
:
"Pattern for roll
-over log fil
es. Supported only with the default Logback setup."
,
"description"
:
"Pattern for roll
ed-over log file nam
es. Supported only with the default Logback setup."
,
"sourceType"
:
"org.springframework.boot.context.logging.LoggingApplicationListener"
,
"sourceType"
:
"org.springframework.boot.context.logging.LoggingApplicationListener"
,
"defaultValue"
:
"${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz"
"defaultValue"
:
"${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz"
},
},
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemPropertiesTests.java
View file @
a0d7d521
...
@@ -84,7 +84,7 @@ class LoggingSystemPropertiesTests {
...
@@ -84,7 +84,7 @@ class LoggingSystemPropertiesTests {
}
}
@Test
@Test
void
rollingFileIsSet
()
{
void
rollingFile
Name
IsSet
()
{
new
LoggingSystemProperties
(
new
LoggingSystemProperties
(
new
MockEnvironment
().
withProperty
(
"logging.pattern.rolling-file-name"
,
"rolling file pattern"
))
new
MockEnvironment
().
withProperty
(
"logging.pattern.rolling-file-name"
,
"rolling file pattern"
))
.
apply
(
null
);
.
apply
(
null
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackConfigurationTests.java
View file @
a0d7d521
...
@@ -69,7 +69,7 @@ class LogbackConfigurationTests {
...
@@ -69,7 +69,7 @@ class LogbackConfigurationTests {
}
}
@Test
@Test
void
defaultFileNamePattern
()
throws
JoranException
{
void
default
Rolling
FileNamePattern
()
throws
JoranException
{
JoranConfigurator
configurator
=
new
JoranConfigurator
();
JoranConfigurator
configurator
=
new
JoranConfigurator
();
LoggerContext
context
=
new
LoggerContext
();
LoggerContext
context
=
new
LoggerContext
();
configurator
.
setContext
(
context
);
configurator
.
setContext
(
context
);
...
@@ -82,7 +82,7 @@ class LogbackConfigurationTests {
...
@@ -82,7 +82,7 @@ class LogbackConfigurationTests {
}
}
@Test
@Test
void
customFileNamePattern
()
throws
JoranException
{
void
custom
Rolling
FileNamePattern
()
throws
JoranException
{
JoranConfigurator
configurator
=
new
JoranConfigurator
();
JoranConfigurator
configurator
=
new
JoranConfigurator
();
LoggerContext
context
=
new
LoggerContext
();
LoggerContext
context
=
new
LoggerContext
();
configurator
.
setContext
(
context
);
configurator
.
setContext
(
context
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java
View file @
a0d7d521
...
@@ -539,7 +539,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
...
@@ -539,7 +539,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
}
}
@Test
@Test
void
testRollingFileProperty
()
{
void
testRollingFile
Name
Property
()
{
MockEnvironment
environment
=
new
MockEnvironment
();
MockEnvironment
environment
=
new
MockEnvironment
();
String
rollingFile
=
"my.log.%d{yyyyMMdd}.%i.gz"
;
String
rollingFile
=
"my.log.%d{yyyyMMdd}.%i.gz"
;
environment
.
setProperty
(
"logging.pattern.rolling-file-name"
,
rollingFile
);
environment
.
setProperty
(
"logging.pattern.rolling-file-name"
,
rollingFile
);
...
...
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