use of org.springframework.boot.ApplicationPid in project spring-boot by spring-projects.
the class LoggingSystemProperties method apply.
public void apply(LogFile logFile) {
RelaxedPropertyResolver propertyResolver = RelaxedPropertyResolver.ignoringUnresolvableNestedPlaceholders(this.environment, "logging.");
setSystemProperty(propertyResolver, EXCEPTION_CONVERSION_WORD, "exception-conversion-word");
setSystemProperty(propertyResolver, CONSOLE_LOG_PATTERN, "pattern.console");
setSystemProperty(propertyResolver, FILE_LOG_PATTERN, "pattern.file");
setSystemProperty(propertyResolver, LOG_LEVEL_PATTERN, "pattern.level");
setSystemProperty(PID_KEY, new ApplicationPid().toString());
if (logFile != null) {
logFile.applyToSystemProperties();
}
}
use of org.springframework.boot.ApplicationPid in project spring-boot by spring-projects.
the class ApplicationPidFileWriter method writePidFile.
private void writePidFile(SpringApplicationEvent event) throws IOException {
File pidFile = this.file;
String override = getProperty(event, FILE_PROPERTIES);
if (override != null) {
pidFile = new File(override);
}
new ApplicationPid().write(pidFile);
pidFile.deleteOnExit();
}
Aggregations