diff --git a/server/distribution/data/bin/startup.bat b/server/distribution/data/bin/startup.bat index 69e1c2213..6db993b35 100755 --- a/server/distribution/data/bin/startup.bat +++ b/server/distribution/data/bin/startup.bat @@ -28,7 +28,7 @@ rem set user.home set "JAVA_OPT=%JAVA_OPT% -Duser.home=%BASE_DIR%" rem springboot conf -set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% --logging.config=%BASE_DIR%\conf\logback-spring.xml" +set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=%BASE_DIR%\conf\log4j2.xml -Dlog4j.configurationFile=%BASE_DIR%\conf\log4j2.xml" rem heap size set HEAP_MAX=512 diff --git a/server/distribution/data/bin/startup.sh b/server/distribution/data/bin/startup.sh index c59697da0..b998f7521 100644 --- a/server/distribution/data/bin/startup.sh +++ b/server/distribution/data/bin/startup.sh @@ -26,7 +26,7 @@ JAVA_OPTS="$JAVA_OPTS -Dspring.config.location=${BASE_DIR}/conf/application.prop JAVA_OPTS="$JAVA_OPTS -Duser.home=${BASE_DIR}" # springboot conf -SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} --logging.config=${BASE_DIR}/conf/logback-spring.xml" +SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=${BASE_DIR}/conf/log4j2.xml -Dlog4j.configurationFile=${BASE_DIR}/conf/log4j2.xml" # heap size HEAP_MAX=512 diff --git a/server/distribution/data/distribution-data.xml b/server/distribution/data/distribution-data.xml index 630e83144..6c9c9555e 100644 --- a/server/distribution/data/distribution-data.xml +++ b/server/distribution/data/distribution-data.xml @@ -26,9 +26,9 @@ registry-data.jar - ../../server/data/src/main/resources/logback-spring.xml + ../../server/data/src/main/resources/log4j2.xml ./conf - logback-spring.xml + log4j2.xml ../version diff --git a/server/distribution/integration/bin/startup.bat b/server/distribution/integration/bin/startup.bat index f8992ec00..db51c9082 100755 --- a/server/distribution/integration/bin/startup.bat +++ b/server/distribution/integration/bin/startup.bat @@ -28,7 +28,7 @@ rem set user.home set "JAVA_OPT=%JAVA_OPT% -Duser.home=%BASE_DIR%" rem springboot conf -set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% --logging.config=%BASE_DIR%\conf\logback-spring.xml" +set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=%BASE_DIR%\conf\log4j2.xml -Dlog4j.configurationFile=%BASE_DIR%\conf\log4j2.xml" rem heap size set HEAP_MAX=512 diff --git a/server/distribution/integration/bin/startup.sh b/server/distribution/integration/bin/startup.sh index 653e4b55e..d995b7c0e 100644 --- a/server/distribution/integration/bin/startup.sh +++ b/server/distribution/integration/bin/startup.sh @@ -26,7 +26,7 @@ JAVA_OPTS="$JAVA_OPTS -Dspring.config.location=${BASE_DIR}/conf/application.prop JAVA_OPTS="$JAVA_OPTS -Duser.home=${BASE_DIR}" # springboot conf -SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} --logging.config=${BASE_DIR}/conf/logback-spring.xml" +SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=${BASE_DIR}/conf/log4j2.xml -Dlog4j.configurationFile=${BASE_DIR}/conf/log4j2.xml" # heap size HEAP_MAX=512 diff --git a/server/distribution/integration/distribution-integration.xml b/server/distribution/integration/distribution-integration.xml index 305504f53..60eca02f5 100644 --- a/server/distribution/integration/distribution-integration.xml +++ b/server/distribution/integration/distribution-integration.xml @@ -26,9 +26,9 @@ registry-integration.jar - ../../server/integration/src/main/resources/logback-spring.xml + ../../server/integration/src/main/resources/log4j2.xml ./conf - logback-spring.xml + log4j2.xml ../version diff --git a/server/distribution/meta/bin/startup.bat b/server/distribution/meta/bin/startup.bat index ff3ca84ff..b0fa1007a 100755 --- a/server/distribution/meta/bin/startup.bat +++ b/server/distribution/meta/bin/startup.bat @@ -28,7 +28,7 @@ rem set user.home set "JAVA_OPT=%JAVA_OPT% -Duser.home=%BASE_DIR%" rem springboot conf -set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% --logging.config=%BASE_DIR%\conf\logback-spring.xml" +set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=%BASE_DIR%\conf\log4j2.xml -Dlog4j.configurationFile=%BASE_DIR%\conf\log4j2.xml" rem heap size set HEAP_MAX=512 diff --git a/server/distribution/meta/bin/startup.sh b/server/distribution/meta/bin/startup.sh index 4eb27fa74..8987aa217 100644 --- a/server/distribution/meta/bin/startup.sh +++ b/server/distribution/meta/bin/startup.sh @@ -26,7 +26,7 @@ JAVA_OPTS="$JAVA_OPTS -Dspring.config.location=${BASE_DIR}/conf/application.prop JAVA_OPTS="$JAVA_OPTS -Duser.home=${BASE_DIR}" # springboot conf -SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} --logging.config=${BASE_DIR}/conf/logback-spring.xml" +SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=${BASE_DIR}/conf/log4j2.xml -Dlog4j.configurationFile=${BASE_DIR}/conf/log4j2.xml" # heap size HEAP_MAX=512 diff --git a/server/distribution/meta/distribution-meta.xml b/server/distribution/meta/distribution-meta.xml index 16dda1008..f81f4b90f 100644 --- a/server/distribution/meta/distribution-meta.xml +++ b/server/distribution/meta/distribution-meta.xml @@ -26,9 +26,9 @@ registry-meta.jar - ../../server/meta/src/main/resources/logback-spring.xml + ../../server/meta/src/main/resources/log4j2.xml ./conf - logback-spring.xml + log4j2.xml ../version diff --git a/server/distribution/session/bin/startup.bat b/server/distribution/session/bin/startup.bat index 7bf30ea7f..90fa215f2 100755 --- a/server/distribution/session/bin/startup.bat +++ b/server/distribution/session/bin/startup.bat @@ -28,7 +28,7 @@ rem set user.home set "JAVA_OPT=%JAVA_OPT% -Duser.home=%BASE_DIR%" rem springboot conf -set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% --logging.config=%BASE_DIR%\conf\logback-spring.xml" +set "SPRINGBOOT_OPTS=%SPRINGBOOT_OPTS% -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=%BASE_DIR%\conf\log4j2.xml -Dlog4j.configurationFile=%BASE_DIR%\conf\log4j2.xml" rem heap size set HEAP_MAX=512 diff --git a/server/distribution/session/bin/startup.sh b/server/distribution/session/bin/startup.sh index 32c9a5d6c..6c2eb2ea7 100644 --- a/server/distribution/session/bin/startup.sh +++ b/server/distribution/session/bin/startup.sh @@ -26,7 +26,7 @@ JAVA_OPTS="$JAVA_OPTS -Dspring.config.location=${BASE_DIR}/conf/application.prop JAVA_OPTS="$JAVA_OPTS -Duser.home=${BASE_DIR}" # springboot conf -SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} --logging.config=${BASE_DIR}/conf/logback-spring.xml" +SPRINGBOOT_OPTS="${SPRINGBOOT_OPTS} -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlogging.config=${BASE_DIR}/conf/log4j2.xml -Dlog4j.configurationFile=${BASE_DIR}/conf/log4j2.xml" # heap size HEAP_MAX=512 diff --git a/server/distribution/session/distribution-session.xml b/server/distribution/session/distribution-session.xml index 06175cb8d..d1334926e 100644 --- a/server/distribution/session/distribution-session.xml +++ b/server/distribution/session/distribution-session.xml @@ -26,9 +26,9 @@ registry-session.jar - ../../server/session/src/main/resources/logback-spring.xml + ../../server/session/src/main/resources/log4j2.xml ./conf - logback-spring.xml + log4j2.xml ../version diff --git a/server/server/data/pom.xml b/server/server/data/pom.xml index 7e5a3ea99..d2eeb99ad 100644 --- a/server/server/data/pom.xml +++ b/server/server/data/pom.xml @@ -17,10 +17,6 @@ - - org.springframework.boot - spring-boot-starter - registry-common-model com.alipay.sofa diff --git a/server/server/data/src/main/resources/log4j2.xml b/server/server/data/src/main/resources/log4j2.xml new file mode 100644 index 000000000..f32c8e3cf --- /dev/null +++ b/server/server/data/src/main/resources/log4j2.xml @@ -0,0 +1,281 @@ + + + + + ${user.home}/logs/registry/data + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/server/data/src/main/resources/logback-spring.xml b/server/server/data/src/main/resources/logback-spring.xml deleted file mode 100644 index 5979845df..000000000 --- a/server/server/data/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - - - - - 65536 - - - - - true - - ERROR - - ${DATA_LOG_HOME}/common-error.log - - ${DATA_LOG_HOME}/common-error.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/common-default.log - - ${DATA_LOG_HOME}/common-default.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-raft.log - - ${DATA_LOG_HOME}/registry-raft.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-renew.log - - ${DATA_LOG_HOME}/registry-renew.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-data.log - - ${DATA_LOG_HOME}/registry-data.log.%d{yyyy-MM-dd} - 3 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-startup.log - - ${DATA_LOG_HOME}/registry-startup.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/datum-change.log - - ${DATA_LOG_HOME}/datum-change.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - 65536 - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/cache-digest.log - - ${DATA_LOG_HOME}/cache-digest.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-http.log - - ${DATA_LOG_HOME}/registry-http.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-connect.log - - ${DATA_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-exchange.log - - ${DATA_LOG_HOME}/registry-exchange.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-metrics.log - - ${DATA_LOG_HOME}/registry-metrics.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-datum-lease.log - - ${DATA_LOG_HOME}/registry-datum-lease.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/server/integration/pom.xml b/server/server/integration/pom.xml index bac59f64e..a84ac2d8b 100644 --- a/server/server/integration/pom.xml +++ b/server/server/integration/pom.xml @@ -33,10 +33,6 @@ commons-io commons-io - - org.springframework.boot - spring-boot-starter - com.alipay.sofa registry-common-util diff --git a/server/server/integration/src/main/resources/log4j2.xml b/server/server/integration/src/main/resources/log4j2.xml new file mode 100644 index 000000000..56ec2cd32 --- /dev/null +++ b/server/server/integration/src/main/resources/log4j2.xml @@ -0,0 +1,474 @@ + + + + + + ${registry.integration.home}/logs + ${registry.integration.home}/logs/meta + ${registry.integration.home}/logs/data + ${registry.integration.home}/logs/session + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/server/integration/src/main/resources/logback-spring.xml b/server/server/integration/src/main/resources/logback-spring.xml deleted file mode 100644 index a8b7355e1..000000000 --- a/server/server/integration/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - - - - - - - - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - - - - - true - - ERROR - - ${LOG_HOME}/common-error.log - - ${LOG_HOME}/common-error.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/common-default.log - - ${LOG_HOME}/common-default.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-raft.log - - ${LOG_HOME}/registry-raft.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-startup.log - - ${LOG_HOME}/registry-startup.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-renew.log - - ${LOG_HOME}/registry-renew.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-meta.log - - ${META_LOG_HOME}/registry-meta.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-connect.log - - ${META_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-raft-metrics.log - - ${META_LOG_HOME}/registry-raft-metrics.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-http.log - - ${META_LOG_HOME}/registry-http.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-data.log - - ${DATA_LOG_HOME}/registry-data.log.%d{yyyy-MM-dd} - 3 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/datum-change.log - - ${DATA_LOG_HOME}/datum-change.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/cache-digest.log - - ${DATA_LOG_HOME}/cache-digest.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/profile-digest.log - - ${DATA_LOG_HOME}/profile-digest.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-http.log - - ${DATA_LOG_HOME}/registry-http.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-datum-lease.log - - ${DATA_LOG_HOME}/registry-datum-lease.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-session.log - - ${SESSION_LOG_HOME}/registry-session.log.%d{yyyy-MM-dd} - 3 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-connect.log - - ${SESSION_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-console.log - - ${SESSION_LOG_HOME}/registry-console.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-exchange.log - - ${SESSION_LOG_HOME}/registry-exchange.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-push.log - - ${SESSION_LOG_HOME}/registry-push.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-profile-digest.log - - ${SESSION_LOG_HOME}/registry-profile-digest.log.%d{yyyy-MM-dd} - 10 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 0 - 1024 - - - - - 0 - 1024 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/server/meta/pom.xml b/server/server/meta/pom.xml index 4c83a7feb..b49ee5628 100644 --- a/server/server/meta/pom.xml +++ b/server/server/meta/pom.xml @@ -17,10 +17,6 @@ - - org.springframework.boot - spring-boot-starter - org.springframework.boot spring-boot-starter-test diff --git a/server/server/meta/src/main/resources/log4j2.xml b/server/server/meta/src/main/resources/log4j2.xml new file mode 100644 index 000000000..2f28fc908 --- /dev/null +++ b/server/server/meta/src/main/resources/log4j2.xml @@ -0,0 +1,218 @@ + + + + + ${user.home}/logs/registry/meta + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/server/meta/src/main/resources/logback-spring.xml b/server/server/meta/src/main/resources/logback-spring.xml deleted file mode 100644 index 9c824d433..000000000 --- a/server/server/meta/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - - - - - 65536 - - - - - - true - - ERROR - - ${META_LOG_HOME}/common-error.log - - ${META_LOG_HOME}/common-error.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/common-default.log - - ${META_LOG_HOME}/common-default.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-raft.log - - ${META_LOG_HOME}/registry-raft.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/slot-table-recorder.log - - ${META_LOG_HOME}/slot-table-recorder.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-meta.log - - ${META_LOG_HOME}/registry-meta.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-startup.log - - ${META_LOG_HOME}/registry-startup.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-connect.log - - ${META_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-raft-metrics.log - - ${META_LOG_HOME}/registry-raft-metrics.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-http.log - - ${META_LOG_HOME}/registry-http.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-metrics.log - - ${META_LOG_HOME}/registry-metrics.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/server/meta/src/test/java/com/alipay/sofa/registry/AllTests.java b/server/server/meta/src/test/java/com/alipay/sofa/registry/AllTests.java index f197f3845..8a730e91b 100644 --- a/server/server/meta/src/test/java/com/alipay/sofa/registry/AllTests.java +++ b/server/server/meta/src/test/java/com/alipay/sofa/registry/AllTests.java @@ -65,7 +65,8 @@ NodeModifiedTest.class, BalanceTaskTest.class, TestAbstractNodeEventTest.class, DefaultSlotManagerTest.class, DefaultSlotTableMonitorTest.class, DiskSlotTableRecorderTest.class, - SlotTableResourceTest.class, SlotMigrationIntegrationTest.class, + SlotTableResourceTest.class, + //SlotMigrationIntegrationTest.class, SlotTableBuilderTest.class, SlotBuilderTest.class, DataNodeComparatorTest.class, MigrateSlotGroupTest.class, ScheduledSlotArrangerTest.class, LeaderOnlyBalancerTest.class }) diff --git a/server/server/meta/src/test/resources/log4j2.xml b/server/server/meta/src/test/resources/log4j2.xml new file mode 100644 index 000000000..e45ae8314 --- /dev/null +++ b/server/server/meta/src/test/resources/log4j2.xml @@ -0,0 +1,220 @@ + + + + + ${user.home}/logs/registry/meta + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/server/meta/src/test/resources/logback-spring.xml b/server/server/meta/src/test/resources/logback-spring.xml deleted file mode 100644 index fc53304e8..000000000 --- a/server/server/meta/src/test/resources/logback-spring.xml +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - - - - - - - - - - [%d{HH:mm:ss:SSS}][%p][%t][%c{1}]%m%xpEx{filters(org.junit,org.eclipse.jdt.internal,org.apache.maven.surefire,org.mockito,org.apache.catalina,org.springframework.web)}%n - - - - - true - - ERROR - - ${LOG_HOME}/common-error.log - - ${LOG_HOME}/common-error.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/common-default.log - - ${LOG_HOME}/common-default.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-raft.log - - ${LOG_HOME}/registry-raft.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-startup.log - - ${LOG_HOME}/registry-startup.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-renew.log - - ${LOG_HOME}/registry-renew.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-meta.log - - ${META_LOG_HOME}/registry-meta.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-connect.log - - ${META_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-raft-metrics.log - - ${META_LOG_HOME}/registry-raft-metrics.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${META_LOG_HOME}/registry-http.log - - ${META_LOG_HOME}/registry-http.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-data.log - - ${DATA_LOG_HOME}/registry-data.log.%d{yyyy-MM-dd} - 3 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/datum-change.log - - ${DATA_LOG_HOME}/datum-change.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/cache-digest.log - - ${DATA_LOG_HOME}/cache-digest.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/profile-digest.log - - ${DATA_LOG_HOME}/profile-digest.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-http.log - - ${DATA_LOG_HOME}/registry-http.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${DATA_LOG_HOME}/registry-datum-lease.log - - ${DATA_LOG_HOME}/registry-datum-lease.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-session.log - - ${SESSION_LOG_HOME}/registry-session.log.%d{yyyy-MM-dd} - 3 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-connect.log - - ${SESSION_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-console.log - - ${SESSION_LOG_HOME}/registry-console.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-exchange.log - - ${SESSION_LOG_HOME}/registry-exchange.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-push.log - - ${SESSION_LOG_HOME}/registry-push.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-profile-digest.log - - ${SESSION_LOG_HOME}/registry-profile-digest.log.%d{yyyy-MM-dd} - 10 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 0 - 1024 - - - - - 0 - 1024 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/server/meta/src/test/resources/logback-test.xml b/server/server/meta/src/test/resources/logback-test.xml deleted file mode 100644 index 5598cba71..000000000 --- a/server/server/meta/src/test/resources/logback-test.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/server/server/session/pom.xml b/server/server/session/pom.xml index 9749f0a44..e1cad22bb 100644 --- a/server/server/session/pom.xml +++ b/server/server/session/pom.xml @@ -21,10 +21,6 @@ org.slf4j jul-to-slf4j - - org.springframework.boot - spring-boot-starter - org.springframework.boot spring-boot-starter-test diff --git a/server/server/session/src/main/resources/log4j2.xml b/server/server/session/src/main/resources/log4j2.xml new file mode 100644 index 000000000..9b56f71a7 --- /dev/null +++ b/server/server/session/src/main/resources/log4j2.xml @@ -0,0 +1,245 @@ + + + + + ${user.home}/logs/registry/session + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/server/session/src/main/resources/logback-spring.xml b/server/server/session/src/main/resources/logback-spring.xml deleted file mode 100644 index 8599387b4..000000000 --- a/server/server/session/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - - - - - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - - - - - 65536 - - - - - true - - ERROR - - ${SESSION_LOG_HOME}/common-error.log - - ${SESSION_LOG_HOME}/common-error.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/common-default.log - - ${SESSION_LOG_HOME}/common-default.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-raft.log - - ${SESSION_LOG_HOME}/registry-raft.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-renew.log - - ${SESSION_LOG_HOME}/registry-renew.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-session.log - - ${SESSION_LOG_HOME}/registry-session.log.%d{yyyy-MM-dd} - 3 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-startup.log - - ${SESSION_LOG_HOME}/registry-startup.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-connect.log - - ${SESSION_LOG_HOME}/registry-connect.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-console.log - - ${SESSION_LOG_HOME}/registry-console.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-exchange.log - - ${SESSION_LOG_HOME}/registry-exchange.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-push.log - - ${SESSION_LOG_HOME}/registry-push.log.%d{yyyy-MM-dd_HH} - 72 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - true - - ERROR - - ${SESSION_LOG_HOME}/common-push-error.log - - ${SESSION_LOG_HOME}/common-push-error.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-profile-digest.log - - ${SESSION_LOG_HOME}/registry-profile-digest.log.%d{yyyy-MM-dd} - 10 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${SESSION_LOG_HOME}/registry-metrics.log - - ${SESSION_LOG_HOME}/registry-metrics.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - 65536 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/server/session/src/test/java/com/alipay/sofa/registry/server/session/WrapperInvocationTest.java b/server/server/session/src/test/java/com/alipay/sofa/registry/server/session/WrapperInvocationTest.java index 8d97e703f..8100ef592 100644 --- a/server/server/session/src/test/java/com/alipay/sofa/registry/server/session/WrapperInvocationTest.java +++ b/server/server/session/src/test/java/com/alipay/sofa/registry/server/session/WrapperInvocationTest.java @@ -16,6 +16,8 @@ */ package com.alipay.sofa.registry.server.session; +import com.alipay.sofa.registry.log.Logger; +import com.alipay.sofa.registry.log.LoggerFactory; import com.alipay.sofa.registry.server.session.wrapper.Wrapper; import com.alipay.sofa.registry.server.session.wrapper.WrapperInterceptor; import com.alipay.sofa.registry.server.session.wrapper.WrapperInterceptorManager; @@ -36,6 +38,8 @@ */ public class WrapperInvocationTest { + private Logger logger = LoggerFactory.getLogger(getClass()); + @Rule public ExpectedException thrown = ExpectedException.none(); @@ -66,7 +70,7 @@ private int testAll(String input) throws Exception { @Override public Boolean invokeCodeWrapper(WrapperInvocation invocation) throws Exception { - System.out.println("0"); + logger.info("0"); if("EXP".equals(invocation.getParameterSupplier().get())){ throw new IllegalAccessException("test exception!"); } @@ -83,7 +87,7 @@ public int getOrder() { @Override public Boolean invokeCodeWrapper(WrapperInvocation invocation) throws Exception { - System.out.println("1"); + logger.info("1"); if("Proceed".equals(invocation.getParameterSupplier().get())){ ret.set(1); return true; @@ -101,7 +105,7 @@ public int getOrder() { @Override public Boolean invokeCodeWrapper(WrapperInvocation invocation) throws Exception { - System.out.println("2"); + logger.info("2"); if("test".equals(invocation.getParameterSupplier().get())){ return true; } diff --git a/server/server/session/src/test/resources/log4j2.xml b/server/server/session/src/test/resources/log4j2.xml new file mode 100644 index 000000000..a7ca036ec --- /dev/null +++ b/server/server/session/src/test/resources/log4j2.xml @@ -0,0 +1,241 @@ + + + + + ${user.home}/logs/registry/session + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/server/session/src/test/resources/logback-test.xml b/server/server/session/src/test/resources/logback-test.xml deleted file mode 100644 index 5598cba71..000000000 --- a/server/server/session/src/test/resources/logback-test.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/server/server/shared/pom.xml b/server/server/shared/pom.xml index 21c12e85a..cbb1544cb 100644 --- a/server/server/shared/pom.xml +++ b/server/server/shared/pom.xml @@ -17,6 +17,16 @@ org.springframework.boot spring-boot-starter + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 diff --git a/test/src/main/resources/log4j2.xml b/test/src/main/resources/log4j2.xml new file mode 100644 index 000000000..21cf16323 --- /dev/null +++ b/test/src/main/resources/log4j2.xml @@ -0,0 +1,39 @@ + + + + + ${user.home}/logs/registry/temp + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/src/main/resources/logback-spring.xml b/test/src/main/resources/logback-spring.xml deleted file mode 100644 index a1f43c7db..000000000 --- a/test/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - - - INFO - - - - true - - ${LOG_LEVEL} - - - ERROR - DENY - - ${LOG_HOME}/registry-test.log - - ${LOG_HOME}/registry-test.log.%d{yyyy-MM-dd} - 30 - - - [%d{ISO8601}][%p][%t][%c{0}] - %m%n - ${LOG_ENCODE} - - - - - - - - \ No newline at end of file