diff --git a/.gitignore b/.gitignore index 32be95cf..693d6d22 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ logs/ .DS_Store HELP.md nohup.out +*.log +*.gz ### STS ### .apt_generated diff --git a/README.md b/README.md index ec7ce0fa..b5110d19 100644 --- a/README.md +++ b/README.md @@ -55,20 +55,22 @@ Here is the highlights of **Muscle and Fitness Server**: 12. [Knife4j](https://doc.xiaominfo.com/) API visualization. Enhanced Swagger API documentation. -13. Log compression. [ELK](https://www.elastic.co/what-is/elk-stack) log aggregation. +13. [Async log output](https://examples.javacodegeeks.com/enterprise-java/logback/logback-ayncappender-example/). Log file compressed by standard GNU zip ([gzip](https://en.wikipedia.org/wiki/Gzip)) compression algorithm. [ELK](https://www.elastic.co/what-is/elk-stack) log aggregation. -14. AOP based request log, configurable for turning on or off. +14. JVM log configuration for JVM garbage collection. -15. Customized method argument validation. +15. AOP based request log, configurable for turning on or off. + +16. Customized method argument validation. - [Date time range validator](https://github.com/johnnymillergh/muscle-and-fitness-server/blob/master/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/validation/validator/DateTimeRangeValidator.java) - [Enum value validator](https://github.com/johnnymillergh/muscle-and-fitness-server/blob/master/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/validation/validator/EnumValueValidator.java) -16. Docker container log persistence. Size and time based rolling policy. +17. Docker container log persistence. Size and time based rolling policy. -17. [Startup and deployment statistics](https://github.com/johnnymillergh/muscle-and-fitness-server/blob/master/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/helper/SpringBootStartupHelper.java). +18. [Startup and deployment statistics](https://github.com/johnnymillergh/muscle-and-fitness-server/blob/master/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/helper/SpringBootStartupHelper.java). -18. Customized startup banner. +19. Customized startup banner. ## Usage diff --git a/docker/.env b/docker/.env index fe34fa1f..b5d229d4 100644 --- a/docker/.env +++ b/docker/.env @@ -66,7 +66,16 @@ MUSCLE_MIS_CONTAINER_NAME=maf-muscle-mis ################################################## # JIB contain's Java tool options # ################################################## -JAVA_TOOL_OPTIONS="-Xms128m -Xmx128m -Dspring.profiles.active=${SPRING_ENVIRONMENT} -Dspring.cloud.consul.host=${CONSUL_REGISTRY_CONTAINER_NAME}" +# JVM GC log reference https://programmer.group/analysis-and-use-of-the-log-related-parameters-of-openjdk-11-jvm.html +JAVA_TOOL_OPTIONS=" +-Xms128m +-Xmx128m +-Dspring.profiles.active=${SPRING_ENVIRONMENT} +-Dspring.cloud.consul.host=${CONSUL_REGISTRY_CONTAINER_NAME} +-Xlog:gc*=info:stdout:time,level,tags +-Xlog:gc*=info:file=gc.%t.log:time,level,tags:filecount=10,filesize=20M +-XX:+PrintCommandLineFlags +" ################################################## # Accounts, Passwords & Common Constants #