From e6bf0e669db4ecee3c918333d2d5117efbbeebee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Miller=20=28=E9=94=BA=E4=BF=8A=29?= Date: Wed, 22 Sep 2021 13:39:27 +0800 Subject: [PATCH] perf($Logback): simplify CONSOLE log format --- .../logback-configuration/logback-base.xml | 34 +++++++++---------- .../logback-development-docker.xml | 2 +- .../logback-development-local.xml | 2 +- .../logback-production.xml | 2 +- .../logback-configuration/logback-stage.xml | 2 +- .../logback-configuration/logback-test.xml | 2 +- .../configuration/OssConfiguration.java | 7 ++-- .../logback-configuration/logback-base.xml | 34 +++++++++---------- .../logback-development-docker.xml | 2 +- .../logback-development-local.xml | 2 +- .../logback-production.xml | 2 +- .../logback-configuration/logback-stage.xml | 2 +- .../logback-configuration/logback-test.xml | 2 +- .../logback-configuration/logback-base.xml | 34 +++++++++---------- .../logback-development-docker.xml | 2 +- .../logback-development-local.xml | 2 +- .../logback-production.xml | 2 +- .../logback-configuration/logback-stage.xml | 2 +- .../logback-configuration/logback-test.xml | 2 +- .../logback-configuration/logback-base.xml | 34 +++++++++---------- .../logback-development-docker.xml | 2 +- .../logback-development-local.xml | 2 +- .../logback-production.xml | 2 +- .../logback-configuration/logback-stage.xml | 2 +- .../logback-configuration/logback-test.xml | 2 +- .../logback-configuration/logback-base.xml | 34 +++++++++---------- .../logback-development-docker.xml | 2 +- .../logback-development-local.xml | 2 +- .../logback-production.xml | 2 +- .../logback-configuration/logback-stage.xml | 2 +- .../logback-configuration/logback-test.xml | 2 +- 31 files changed, 113 insertions(+), 114 deletions(-) diff --git a/api-gateway/src/main/resources/logback-configuration/logback-base.xml b/api-gateway/src/main/resources/logback-configuration/logback-base.xml index 752c300a..01e5fa06 100644 --- a/api-gateway/src/main/resources/logback-configuration/logback-base.xml +++ b/api-gateway/src/main/resources/logback-configuration/logback-base.xml @@ -12,9 +12,9 @@ + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr(${PID:- }){magenta} - [%15.15t] %-48.48logger{48} : %msg%n%wEx"/> + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } - [%t] %-48.48logger{48} : %msg%n%wEx"/> @@ -40,28 +40,26 @@ - + ${CONSOLE_LOG_PATTERN} UTF-8 - - - 0 - + + 0 + 256 - false true - + ALL @@ -86,24 +84,26 @@ 1GB - - - 0 - + 0 256 - false - - false + true - + ${LOGSTASH_HOST}:4560 {"applicationName": "${APPLICATION}", "environment": "${ENVIRONMENT}"} + + + 0 + 256 + false + true + diff --git a/api-gateway/src/main/resources/logback-configuration/logback-development-docker.xml b/api-gateway/src/main/resources/logback-configuration/logback-development-docker.xml index 0a046888..0e1d9bf4 100644 --- a/api-gateway/src/main/resources/logback-configuration/logback-development-docker.xml +++ b/api-gateway/src/main/resources/logback-configuration/logback-development-docker.xml @@ -6,6 +6,6 @@ - + diff --git a/api-gateway/src/main/resources/logback-configuration/logback-development-local.xml b/api-gateway/src/main/resources/logback-configuration/logback-development-local.xml index 0a046888..0e1d9bf4 100644 --- a/api-gateway/src/main/resources/logback-configuration/logback-development-local.xml +++ b/api-gateway/src/main/resources/logback-configuration/logback-development-local.xml @@ -6,6 +6,6 @@ - + diff --git a/api-gateway/src/main/resources/logback-configuration/logback-production.xml b/api-gateway/src/main/resources/logback-configuration/logback-production.xml index 0a046888..0e1d9bf4 100644 --- a/api-gateway/src/main/resources/logback-configuration/logback-production.xml +++ b/api-gateway/src/main/resources/logback-configuration/logback-production.xml @@ -6,6 +6,6 @@ - + diff --git a/api-gateway/src/main/resources/logback-configuration/logback-stage.xml b/api-gateway/src/main/resources/logback-configuration/logback-stage.xml index 0a046888..0e1d9bf4 100644 --- a/api-gateway/src/main/resources/logback-configuration/logback-stage.xml +++ b/api-gateway/src/main/resources/logback-configuration/logback-stage.xml @@ -6,6 +6,6 @@ - + diff --git a/api-gateway/src/main/resources/logback-configuration/logback-test.xml b/api-gateway/src/main/resources/logback-configuration/logback-test.xml index b560ef5a..61d56ba1 100644 --- a/api-gateway/src/main/resources/logback-configuration/logback-test.xml +++ b/api-gateway/src/main/resources/logback-configuration/logback-test.xml @@ -6,6 +6,6 @@ - + diff --git a/auth-center/src/main/java/com/jmsoftware/maf/authcenter/configuration/OssConfiguration.java b/auth-center/src/main/java/com/jmsoftware/maf/authcenter/configuration/OssConfiguration.java index faa2af1b..4e1df18c 100644 --- a/auth-center/src/main/java/com/jmsoftware/maf/authcenter/configuration/OssConfiguration.java +++ b/auth-center/src/main/java/com/jmsoftware/maf/authcenter/configuration/OssConfiguration.java @@ -8,7 +8,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.mock.web.MockMultipartFile; -import org.springframework.web.multipart.MultipartFile; /** * Description: OssConfiguration, change description here. @@ -24,9 +23,9 @@ public class OssConfiguration { @Bean public OssUploader ossUploader() { return (name, inputStream) -> { - MultipartFile file = new MockMultipartFile(name, name, null, inputStream); - val response = this.ossCenterRemoteApi.uploadSingleResource(file); - log.info("Called {} to upload file. {}", OssCenterRemoteApi.SERVICE_NAME, response); + val multipartFile = new MockMultipartFile(name, name, null, inputStream); + val response = this.ossCenterRemoteApi.uploadSingleResource(multipartFile); + log.info("Called {} to upload multipartFile. {}", OssCenterRemoteApi.SERVICE_NAME, response); return String.format("%s/%s", response.getData().getBucket(), response.getData().getObject()); }; } diff --git a/auth-center/src/main/resources/logback-configuration/logback-base.xml b/auth-center/src/main/resources/logback-configuration/logback-base.xml index 752c300a..01e5fa06 100644 --- a/auth-center/src/main/resources/logback-configuration/logback-base.xml +++ b/auth-center/src/main/resources/logback-configuration/logback-base.xml @@ -12,9 +12,9 @@ + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr(${PID:- }){magenta} - [%15.15t] %-48.48logger{48} : %msg%n%wEx"/> + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } - [%t] %-48.48logger{48} : %msg%n%wEx"/> @@ -40,28 +40,26 @@ - + ${CONSOLE_LOG_PATTERN} UTF-8 - - - 0 - + + 0 + 256 - false true - + ALL @@ -86,24 +84,26 @@ 1GB - - - 0 - + 0 256 - false - - false + true - + ${LOGSTASH_HOST}:4560 {"applicationName": "${APPLICATION}", "environment": "${ENVIRONMENT}"} + + + 0 + 256 + false + true + diff --git a/auth-center/src/main/resources/logback-configuration/logback-development-docker.xml b/auth-center/src/main/resources/logback-configuration/logback-development-docker.xml index 0a046888..0e1d9bf4 100644 --- a/auth-center/src/main/resources/logback-configuration/logback-development-docker.xml +++ b/auth-center/src/main/resources/logback-configuration/logback-development-docker.xml @@ -6,6 +6,6 @@ - + diff --git a/auth-center/src/main/resources/logback-configuration/logback-development-local.xml b/auth-center/src/main/resources/logback-configuration/logback-development-local.xml index 0a046888..0e1d9bf4 100644 --- a/auth-center/src/main/resources/logback-configuration/logback-development-local.xml +++ b/auth-center/src/main/resources/logback-configuration/logback-development-local.xml @@ -6,6 +6,6 @@ - + diff --git a/auth-center/src/main/resources/logback-configuration/logback-production.xml b/auth-center/src/main/resources/logback-configuration/logback-production.xml index 0a046888..0e1d9bf4 100644 --- a/auth-center/src/main/resources/logback-configuration/logback-production.xml +++ b/auth-center/src/main/resources/logback-configuration/logback-production.xml @@ -6,6 +6,6 @@ - + diff --git a/auth-center/src/main/resources/logback-configuration/logback-stage.xml b/auth-center/src/main/resources/logback-configuration/logback-stage.xml index 0a046888..0e1d9bf4 100644 --- a/auth-center/src/main/resources/logback-configuration/logback-stage.xml +++ b/auth-center/src/main/resources/logback-configuration/logback-stage.xml @@ -6,6 +6,6 @@ - + diff --git a/auth-center/src/main/resources/logback-configuration/logback-test.xml b/auth-center/src/main/resources/logback-configuration/logback-test.xml index b560ef5a..61d56ba1 100644 --- a/auth-center/src/main/resources/logback-configuration/logback-test.xml +++ b/auth-center/src/main/resources/logback-configuration/logback-test.xml @@ -6,6 +6,6 @@ - + diff --git a/maf-mis/src/main/resources/logback-configuration/logback-base.xml b/maf-mis/src/main/resources/logback-configuration/logback-base.xml index 752c300a..01e5fa06 100644 --- a/maf-mis/src/main/resources/logback-configuration/logback-base.xml +++ b/maf-mis/src/main/resources/logback-configuration/logback-base.xml @@ -12,9 +12,9 @@ + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr(${PID:- }){magenta} - [%15.15t] %-48.48logger{48} : %msg%n%wEx"/> + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } - [%t] %-48.48logger{48} : %msg%n%wEx"/> @@ -40,28 +40,26 @@ - + ${CONSOLE_LOG_PATTERN} UTF-8 - - - 0 - + + 0 + 256 - false true - + ALL @@ -86,24 +84,26 @@ 1GB - - - 0 - + 0 256 - false - - false + true - + ${LOGSTASH_HOST}:4560 {"applicationName": "${APPLICATION}", "environment": "${ENVIRONMENT}"} + + + 0 + 256 + false + true + diff --git a/maf-mis/src/main/resources/logback-configuration/logback-development-docker.xml b/maf-mis/src/main/resources/logback-configuration/logback-development-docker.xml index 0a046888..0e1d9bf4 100644 --- a/maf-mis/src/main/resources/logback-configuration/logback-development-docker.xml +++ b/maf-mis/src/main/resources/logback-configuration/logback-development-docker.xml @@ -6,6 +6,6 @@ - + diff --git a/maf-mis/src/main/resources/logback-configuration/logback-development-local.xml b/maf-mis/src/main/resources/logback-configuration/logback-development-local.xml index 0a046888..0e1d9bf4 100644 --- a/maf-mis/src/main/resources/logback-configuration/logback-development-local.xml +++ b/maf-mis/src/main/resources/logback-configuration/logback-development-local.xml @@ -6,6 +6,6 @@ - + diff --git a/maf-mis/src/main/resources/logback-configuration/logback-production.xml b/maf-mis/src/main/resources/logback-configuration/logback-production.xml index 0a046888..0e1d9bf4 100644 --- a/maf-mis/src/main/resources/logback-configuration/logback-production.xml +++ b/maf-mis/src/main/resources/logback-configuration/logback-production.xml @@ -6,6 +6,6 @@ - + diff --git a/maf-mis/src/main/resources/logback-configuration/logback-stage.xml b/maf-mis/src/main/resources/logback-configuration/logback-stage.xml index 0a046888..0e1d9bf4 100644 --- a/maf-mis/src/main/resources/logback-configuration/logback-stage.xml +++ b/maf-mis/src/main/resources/logback-configuration/logback-stage.xml @@ -6,6 +6,6 @@ - + diff --git a/maf-mis/src/main/resources/logback-configuration/logback-test.xml b/maf-mis/src/main/resources/logback-configuration/logback-test.xml index b560ef5a..61d56ba1 100644 --- a/maf-mis/src/main/resources/logback-configuration/logback-test.xml +++ b/maf-mis/src/main/resources/logback-configuration/logback-test.xml @@ -6,6 +6,6 @@ - + diff --git a/oss-center/src/main/resources/logback-configuration/logback-base.xml b/oss-center/src/main/resources/logback-configuration/logback-base.xml index 752c300a..01e5fa06 100644 --- a/oss-center/src/main/resources/logback-configuration/logback-base.xml +++ b/oss-center/src/main/resources/logback-configuration/logback-base.xml @@ -12,9 +12,9 @@ + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr(${PID:- }){magenta} - [%15.15t] %-48.48logger{48} : %msg%n%wEx"/> + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } - [%t] %-48.48logger{48} : %msg%n%wEx"/> @@ -40,28 +40,26 @@ - + ${CONSOLE_LOG_PATTERN} UTF-8 - - - 0 - + + 0 + 256 - false true - + ALL @@ -86,24 +84,26 @@ 1GB - - - 0 - + 0 256 - false - - false + true - + ${LOGSTASH_HOST}:4560 {"applicationName": "${APPLICATION}", "environment": "${ENVIRONMENT}"} + + + 0 + 256 + false + true + diff --git a/oss-center/src/main/resources/logback-configuration/logback-development-docker.xml b/oss-center/src/main/resources/logback-configuration/logback-development-docker.xml index 0a046888..0e1d9bf4 100644 --- a/oss-center/src/main/resources/logback-configuration/logback-development-docker.xml +++ b/oss-center/src/main/resources/logback-configuration/logback-development-docker.xml @@ -6,6 +6,6 @@ - + diff --git a/oss-center/src/main/resources/logback-configuration/logback-development-local.xml b/oss-center/src/main/resources/logback-configuration/logback-development-local.xml index 0a046888..0e1d9bf4 100644 --- a/oss-center/src/main/resources/logback-configuration/logback-development-local.xml +++ b/oss-center/src/main/resources/logback-configuration/logback-development-local.xml @@ -6,6 +6,6 @@ - + diff --git a/oss-center/src/main/resources/logback-configuration/logback-production.xml b/oss-center/src/main/resources/logback-configuration/logback-production.xml index 0a046888..0e1d9bf4 100644 --- a/oss-center/src/main/resources/logback-configuration/logback-production.xml +++ b/oss-center/src/main/resources/logback-configuration/logback-production.xml @@ -6,6 +6,6 @@ - + diff --git a/oss-center/src/main/resources/logback-configuration/logback-stage.xml b/oss-center/src/main/resources/logback-configuration/logback-stage.xml index 0a046888..0e1d9bf4 100644 --- a/oss-center/src/main/resources/logback-configuration/logback-stage.xml +++ b/oss-center/src/main/resources/logback-configuration/logback-stage.xml @@ -6,6 +6,6 @@ - + diff --git a/oss-center/src/main/resources/logback-configuration/logback-test.xml b/oss-center/src/main/resources/logback-configuration/logback-test.xml index b560ef5a..61d56ba1 100644 --- a/oss-center/src/main/resources/logback-configuration/logback-test.xml +++ b/oss-center/src/main/resources/logback-configuration/logback-test.xml @@ -6,6 +6,6 @@ - + diff --git a/spring-boot-admin/src/main/resources/logback-configuration/logback-base.xml b/spring-boot-admin/src/main/resources/logback-configuration/logback-base.xml index 752c300a..01e5fa06 100644 --- a/spring-boot-admin/src/main/resources/logback-configuration/logback-base.xml +++ b/spring-boot-admin/src/main/resources/logback-configuration/logback-base.xml @@ -12,9 +12,9 @@ + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr(${PID:- }){magenta} - [%15.15t] %-48.48logger{48} : %msg%n%wEx"/> + value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } - [%t] %-48.48logger{48} : %msg%n%wEx"/> @@ -40,28 +40,26 @@ - + ${CONSOLE_LOG_PATTERN} UTF-8 - - - 0 - + + 0 + 256 - false true - + ALL @@ -86,24 +84,26 @@ 1GB - - - 0 - + 0 256 - false - - false + true - + ${LOGSTASH_HOST}:4560 {"applicationName": "${APPLICATION}", "environment": "${ENVIRONMENT}"} + + + 0 + 256 + false + true + diff --git a/spring-boot-admin/src/main/resources/logback-configuration/logback-development-docker.xml b/spring-boot-admin/src/main/resources/logback-configuration/logback-development-docker.xml index 0a046888..0e1d9bf4 100644 --- a/spring-boot-admin/src/main/resources/logback-configuration/logback-development-docker.xml +++ b/spring-boot-admin/src/main/resources/logback-configuration/logback-development-docker.xml @@ -6,6 +6,6 @@ - + diff --git a/spring-boot-admin/src/main/resources/logback-configuration/logback-development-local.xml b/spring-boot-admin/src/main/resources/logback-configuration/logback-development-local.xml index 0a046888..0e1d9bf4 100644 --- a/spring-boot-admin/src/main/resources/logback-configuration/logback-development-local.xml +++ b/spring-boot-admin/src/main/resources/logback-configuration/logback-development-local.xml @@ -6,6 +6,6 @@ - + diff --git a/spring-boot-admin/src/main/resources/logback-configuration/logback-production.xml b/spring-boot-admin/src/main/resources/logback-configuration/logback-production.xml index 0a046888..0e1d9bf4 100644 --- a/spring-boot-admin/src/main/resources/logback-configuration/logback-production.xml +++ b/spring-boot-admin/src/main/resources/logback-configuration/logback-production.xml @@ -6,6 +6,6 @@ - + diff --git a/spring-boot-admin/src/main/resources/logback-configuration/logback-stage.xml b/spring-boot-admin/src/main/resources/logback-configuration/logback-stage.xml index 0a046888..0e1d9bf4 100644 --- a/spring-boot-admin/src/main/resources/logback-configuration/logback-stage.xml +++ b/spring-boot-admin/src/main/resources/logback-configuration/logback-stage.xml @@ -6,6 +6,6 @@ - + diff --git a/spring-boot-admin/src/main/resources/logback-configuration/logback-test.xml b/spring-boot-admin/src/main/resources/logback-configuration/logback-test.xml index b560ef5a..61d56ba1 100644 --- a/spring-boot-admin/src/main/resources/logback-configuration/logback-test.xml +++ b/spring-boot-admin/src/main/resources/logback-configuration/logback-test.xml @@ -6,6 +6,6 @@ - +