diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 268cc8b..e011af1 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,9 +1,3 @@ -logging: - level: - im: - zhaojun: info - path: ${user.home}/.zfile/logs - server: port: 8080 servlet: @@ -40,10 +34,12 @@ spring: properties: hibernate: format_sql: false - show-sql: true + show-sql: false resources: chain: gzipped: true + profiles: + active: prod zfile: cache: timeout: 300 diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..af5eb0c --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + INFO + + + %clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + + + + + + + ${LOG_HOME}/${appName}.log + + + + + ${LOG_HOME}/${appName}-%d{yyyy-MM-dd}-%i.log + + 365 + + + 5MB + + + + + %d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + + + + + + + + + + + + + + + + + + + \ No newline at end of file