Polish "Add ROLLING_FILE_NAME_PATTERN for File Appender"
See gh-18151
This commit is contained in:
parent
4a3810a0f1
commit
a0d7d52106
|
|
@ -1777,7 +1777,7 @@ To help with the customization, some other properties are transferred from the S
|
|||
|
||||
| `logging.pattern.rolling-file-name`
|
||||
| `ROLLING_FILE_NAME_PATTERN`
|
||||
| Pattern to use when roll-over log files (default `$\{LOG_FILE}.%d\{yyyy-MM-dd}.%i.gz`).
|
||||
| Pattern for rolled-over log file names (default `$\{LOG_FILE}.%d\{yyyy-MM-dd}.%i.gz`).
|
||||
(Only supported with the default Logback setup.)
|
||||
|
||||
| `PID`
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ public class LoggingSystemProperties {
|
|||
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";
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ import org.springframework.util.unit.DataSize;
|
|||
* @author Madhura Bhave
|
||||
* @author Vedran Pavic
|
||||
* @author Robert Thornton
|
||||
* @author Eddú Meléndez
|
||||
*/
|
||||
class DefaultLogbackConfiguration {
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ import org.springframework.util.StringUtils;
|
|||
* @author Dave Syer
|
||||
* @author Andy Wilkinson
|
||||
* @author Ben Hale
|
||||
* @author Eddú Meléndez
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class LogbackLoggingSystem extends Slf4JLoggingSystem {
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
{
|
||||
"name": "logging.pattern.rolling-file-name",
|
||||
"type": "java.lang.String",
|
||||
"description": "Pattern for roll-over log files. Supported only with the default Logback setup.",
|
||||
"description": "Pattern for rolled-over log file names. Supported only with the default Logback setup.",
|
||||
"sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener",
|
||||
"defaultValue": "${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class LoggingSystemPropertiesTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void rollingFileIsSet() {
|
||||
void rollingFileNameIsSet() {
|
||||
new LoggingSystemProperties(
|
||||
new MockEnvironment().withProperty("logging.pattern.rolling-file-name", "rolling file pattern"))
|
||||
.apply(null);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class LogbackConfigurationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void defaultFileNamePattern() throws JoranException {
|
||||
void defaultRollingFileNamePattern() throws JoranException {
|
||||
JoranConfigurator configurator = new JoranConfigurator();
|
||||
LoggerContext context = new LoggerContext();
|
||||
configurator.setContext(context);
|
||||
|
|
@ -82,7 +82,7 @@ class LogbackConfigurationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void customFileNamePattern() throws JoranException {
|
||||
void customRollingFileNamePattern() throws JoranException {
|
||||
JoranConfigurator configurator = new JoranConfigurator();
|
||||
LoggerContext context = new LoggerContext();
|
||||
configurator.setContext(context);
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void testRollingFileProperty() {
|
||||
void testRollingFileNameProperty() {
|
||||
MockEnvironment environment = new MockEnvironment();
|
||||
String rollingFile = "my.log.%d{yyyyMMdd}.%i.gz";
|
||||
environment.setProperty("logging.pattern.rolling-file-name", rollingFile);
|
||||
|
|
|
|||
Loading…
Reference in New Issue