diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java b/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java index 3d68844fe7..e40d86da01 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java @@ -83,8 +83,8 @@ public class LogFile { * @param properties the properties to apply to */ public void applyTo(Properties properties) { - put(properties, "LOG_PATH", this.path); - put(properties, "LOG_FILE", toString()); + put(properties, LoggingApplicationListener.LOG_PATH, this.path); + put(properties, LoggingApplicationListener.LOG_FILE, toString()); } private void put(Properties properties, String key, String value) { diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 5cb49a0074..1b64ee2654 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -98,23 +98,25 @@ public class LoggingApplicationListener implements GenericApplicationListener { * The name of the Spring property that contains the directory where log files are * written. */ + @Deprecated public static final String PATH_PROPERTY = LogFile.PATH_PROPERTY; /** * The name of the Spring property that contains the name of the log file. Names can * be an exact location or relative to the current directory. */ + @Deprecated public static final String FILE_PROPERTY = LogFile.FILE_PROPERTY; /** * The name of the System property that contains the process ID. */ - public static final String PID_KEY = LoggingSystemProperties.PID_KEY; + public static final String PID_KEY = "PID"; /** * The name of the System property that contains the exception conversion word. */ - public static final String EXCEPTION_CONVERSION_WORD = LoggingSystemProperties.EXCEPTION_CONVERSION_WORD; + public static final String EXCEPTION_CONVERSION_WORD = "LOG_EXCEPTION_CONVERSION_WORD"; /** * The name of the System property that contains the log file. @@ -129,17 +131,17 @@ public class LoggingApplicationListener implements GenericApplicationListener { /** * The name of the System property that contains the console log pattern. */ - public static final String CONSOLE_LOG_PATTERN = LoggingSystemProperties.CONSOLE_LOG_PATTERN; + public static final String CONSOLE_LOG_PATTERN = "CONSOLE_LOG_PATTERN"; /** * The name of the System property that contains the file log pattern. */ - public static final String FILE_LOG_PATTERN = LoggingSystemProperties.FILE_LOG_PATTERN; + public static final String FILE_LOG_PATTERN = "FILE_LOG_PATTERN"; /** * The name of the System property that contains the log level pattern. */ - public static final String LOG_LEVEL_PATTERN = LoggingSystemProperties.LOG_LEVEL_PATTERN; + public static final String LOG_LEVEL_PATTERN = "LOG_LEVEL_PATTERN"; /** * The name of the {@link LoggingSystem} bean. diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java index 14337f2037..7e815cc94d 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java @@ -28,15 +28,15 @@ import org.springframework.core.env.Environment; */ class LoggingSystemProperties { - static final String PID_KEY = "PID"; + static final String PID_KEY = LoggingApplicationListener.PID_KEY; - static final String EXCEPTION_CONVERSION_WORD = "LOG_EXCEPTION_CONVERSION_WORD"; + static final String EXCEPTION_CONVERSION_WORD = LoggingApplicationListener.EXCEPTION_CONVERSION_WORD; - static final String CONSOLE_LOG_PATTERN = "CONSOLE_LOG_PATTERN"; + static final String CONSOLE_LOG_PATTERN = LoggingApplicationListener.CONSOLE_LOG_PATTERN; - static final String FILE_LOG_PATTERN = "FILE_LOG_PATTERN"; + static final String FILE_LOG_PATTERN = LoggingApplicationListener.FILE_LOG_PATTERN; - static final String LOG_LEVEL_PATTERN = "LOG_LEVEL_PATTERN"; + static final String LOG_LEVEL_PATTERN = LoggingApplicationListener.LOG_LEVEL_PATTERN; private final Environment environment;