Commit 1fa9b8c2 authored by Quxl's avatar Quxl

x

parent e68f44d9
package com.egolm.pds; package com.egolm.pds;
import java.util.TimeZone;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
...@@ -12,7 +16,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -12,7 +16,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(exclude = { RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class }) @SpringBootApplication(exclude = { RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class })
public class PDSApplication { public class PDSApplication {
private static Log logger = LogFactory.getLog(PDSApplication.class);
public static void main(String[] args) { public static void main(String[] args) {
logger.info("JAVA_HOME = " + System.getProperty("java.home"));
System.setProperty("java.io.tmpdir", "temp");
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
SpringApplication.run(PDSApplication.class, args); SpringApplication.run(PDSApplication.class, args);
} }
......
server: server:
port: 9090 servlet:
port: 9090
tomcat:
basedir: temp
spring: spring:
profiles: profiles:
active: dev active: dev
......
...@@ -3,41 +3,18 @@ ...@@ -3,41 +3,18 @@
<include resource="org/springframework/boot/logging/logback/base.xml" /> <include resource="org/springframework/boot/logging/logback/base.xml" />
<appender name="siftingAppender" class="ch.qos.logback.classic.sift.SiftingAppender"> <appender name="commonAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<discriminator> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<key>context</key> <FileNamePattern>logs/system-%d{yyyy-MM-dd}.log</FileNamePattern>
<DefaultValue>logback</DefaultValue> <MaxHistory>30</MaxHistory>
</discriminator> </rollingPolicy>
<sift> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<appender name="rollingFileAppender" <pattern>${CONSOLE_LOG_PATTERN}</pattern>
class="ch.qos.logback.core.rolling.RollingFileAppender"> </encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>logs/${context}-%d{yyyy-MM-dd}.log</FileNamePattern>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
</sift>
</appender> </appender>
<root level="INFO"> <root level="INFO">
<appender-ref ref="siftingAppender" /> <appender-ref ref="commonAppender" />
</root> </root>
<springProfile name="dev">
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
</springProfile>
<springProfile name="pro">
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
</springProfile>
<logger name="com.egolm" level="DEBUG" />
</configuration> </configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment