diff --git a/.gitignore b/.gitignore index 956f4e305..6915694fa 100644 --- a/.gitignore +++ b/.gitignore @@ -37,10 +37,10 @@ target/ *.tar.gz ### logs #### -logs +/logs/ +*.log ### temp ignore ### -*.log *.cache *.diff *.patch diff --git a/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml b/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..578b8c92e --- /dev/null +++ b/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + + + + + + + + + diff --git a/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties b/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties index 76296deab..db34a0283 100644 --- a/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties +++ b/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties @@ -1 +1 @@ -restart.include.pigx-common-security=/pigx-common-log[\\w-]+\.jar +restart.include.pigx-common-log=/pigx-common-log[\\w-]+\.jar diff --git a/pigx-config/src/main/resources/logback-spring.xml b/pigx-config/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..578b8c92e --- /dev/null +++ b/pigx-config/src/main/resources/logback-spring.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + + + + + + + + + diff --git a/pigx-eureka/src/main/resources/logback-spring.xml b/pigx-eureka/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..578b8c92e --- /dev/null +++ b/pigx-eureka/src/main/resources/logback-spring.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + + + + + + + + +