You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2021/07/08 05:26:51 UTC

[incubator-shenyu] branch master updated: [ISSUE #1700] Refactor shenyu-bootstrap release package structure (#1735)

This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 753a812  [ISSUE #1700] Refactor shenyu-bootstrap release package structure (#1735)
753a812 is described below

commit 753a81299334d51bbad4d1745550a901001d9a2e
Author: Zhang Yonglun <zh...@apache.org>
AuthorDate: Thu Jul 8 13:26:41 2021 +0800

    [ISSUE #1700] Refactor shenyu-bootstrap release package structure (#1735)
    
    * refactor shenyu-bootstrap release package structure
    
    * refactor shenyu-bootstrap release package structure
---
 shenyu-bootstrap/pom.xml                           | 11 ---
 shenyu-dist/shenyu-bootstrap-dist/pom.xml          | 46 ++++------
 .../src/main/assembly/binary.xml                   | 19 +++--
 .../src/main/resources/bin/shutdown.sh             | 24 ------
 .../src/main/resources/bin/start.bat               | 84 ++++++++-----------
 .../src/main/resources/bin/start.sh                | 82 +++++++-----------
 .../src/main/resources/bin/stop.sh                 | 51 ++++++++++++
 .../src/main/resources/logback.xml                 | 97 ++++++++++++++++++++++
 8 files changed, 243 insertions(+), 171 deletions(-)

diff --git a/shenyu-bootstrap/pom.xml b/shenyu-bootstrap/pom.xml
index 23ada00..b35a725 100644
--- a/shenyu-bootstrap/pom.xml
+++ b/shenyu-bootstrap/pom.xml
@@ -378,17 +378,6 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <version>${spring-boot.version}</version>
-                <configuration>
-                    <mainClass>org.apache.shenyu.bootstrap.ShenyuBootstrapApplication</mainClass>
-                    <executable>true</executable>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
diff --git a/shenyu-dist/shenyu-bootstrap-dist/pom.xml b/shenyu-dist/shenyu-bootstrap-dist/pom.xml
index d4b7d9e..ff425d4 100644
--- a/shenyu-dist/shenyu-bootstrap-dist/pom.xml
+++ b/shenyu-dist/shenyu-bootstrap-dist/pom.xml
@@ -35,6 +35,17 @@
             <artifactId>shenyu-bootstrap</artifactId>
             <version>${project.version}</version>
         </dependency>
+    
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j-over-slf4j</artifactId>
+                    <groupId>org.slf4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
     </dependencies>
 
     <profiles>
@@ -44,50 +55,29 @@
                 <activeByDefault>true</activeByDefault>
             </activation>
             <build>
-                <finalName>shenyu-bootstrap-bin-${project.version}</finalName>
+                <finalName>apache-shenyu-incubating-${project.version}</finalName>
                 <plugins>
                     <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-assembly-plugin</artifactId>
                         <executions>
                             <execution>
-                                <id>shenyu-bootstrap-bin</id>
+                                <id>bootstrap-bin</id>
                                 <phase>package</phase>
                                 <goals>
                                     <goal>single</goal>
                                 </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>${project.basedir}/src/main/assembly/binary.xml</descriptor>
-                                    </descriptors>
-                                </configuration>
                             </execution>
                         </executions>
                         <configuration>
+                            <descriptors>
+                                <descriptor>${project.basedir}/src/main/assembly/binary.xml</descriptor>
+                            </descriptors>
                             <attach>true</attach>
                             <tarLongFileMode>posix</tarLongFileMode>
                             <runOnlyAtExecutionRoot>false</runOnlyAtExecutionRoot>
-                            <appendAssemblyId>false</appendAssemblyId>
                         </configuration>
                     </plugin>
-
-                    <plugin>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>copy</id>
-                                <phase>package</phase>
-                                <goals>
-
-                                    <goal>run</goal>
-                                </goals>
-                                <configuration>
-                                    <target>
-                                        <copy file="${project.build.directory}/${project.build.finalName}.tar.gz" tofile="${project.basedir}/../../dist/${project.build.finalName}.tar.gz" overwrite="true" />
-                                    </target>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
                 </plugins>
             </build>
         </profile>
@@ -115,7 +105,7 @@
                             <repository>apache/shenyu-bootstrap</repository>
                             <tag>${project.version}</tag>
                             <buildArgs>
-                                <APP_NAME>shenyu-bootstrap-bin-${project.version}</APP_NAME>
+                                <APP_NAME>apache-shenyu-incubating-${project.version}-bootstrap-bin</APP_NAME>
                             </buildArgs>
                         </configuration>
                     </plugin>
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/assembly/binary.xml b/shenyu-dist/shenyu-bootstrap-dist/src/main/assembly/binary.xml
index de86179..18c9f9d 100644
--- a/shenyu-dist/shenyu-bootstrap-dist/src/main/assembly/binary.xml
+++ b/shenyu-dist/shenyu-bootstrap-dist/src/main/assembly/binary.xml
@@ -19,20 +19,29 @@
     xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>shenyu-bootstrap-bin</id>
+    <id>bootstrap-bin</id>
     <formats>
         <format>tar.gz</format>
     </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>${project.build.finalName}-bootstrap-bin</baseDirectory>
 
     <fileSets>
         <fileSet>
-            <directory>${project.basedir}/../../shenyu-bootstrap/src/main/resources</directory>
+            <directory>src/main/resources</directory>
+            <lineEnding>unix</lineEnding>
+            <includes>
+                <include>*.xml</include>
+            </includes>
             <outputDirectory>conf</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>${project.basedir}/../../shenyu-bootstrap/src/main/resources</directory>
             <includes>
                 <include>*.yml</include>
             </includes>
+            <outputDirectory>conf</outputDirectory>
         </fileSet>
-
         <fileSet>
             <directory>src/main/resources/bin</directory>
             <lineEnding>unix</lineEnding>
@@ -55,10 +64,6 @@
     <dependencySets>
         <dependencySet>
             <outputDirectory>lib</outputDirectory>
-            <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping>
-            <includes>
-                <include>org.apache.shenyu:shenyu-bootstrap</include>
-            </includes>
             <fileMode>0644</fileMode>
         </dependencySet>
     </dependencySets>
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/shutdown.sh b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/shutdown.sh
deleted file mode 100644
index 7d6b020..0000000
--- a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/shutdown.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-PRGDIR=`dirname "$0"`
-APP=$PRGDIR/../lib/shenyu-bootstrap.jar
-BASE_DIR=$PRGDIR/..
-PID_FILE=$BASE_DIR/logs/shenyu-bootstrap.pid
-
-PID=$(cat $PID_FILE 2>/dev/null)
-kill -KILL $PID 2>/dev/null
-echo "Stopping $APP OK"
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
index e789466..f96c961 100644
--- a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
+++ b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
@@ -1,50 +1,34 @@
-@REM
-@REM  Licensed to the Apache Software Foundation (ASF) under one or more
-@REM  contributor license agreements.  See the NOTICE file distributed with
-@REM  this work for additional information regarding copyright ownership.
-@REM  The ASF licenses this file to You under the Apache License, Version 2.0
-@REM  (the "License"); you may not use this file except in compliance with
-@REM  the License.  You may obtain a copy of the License at
-@REM
-@REM      http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM  Unless required by applicable law or agreed to in writing, software
-@REM  distributed under the License is distributed on an "AS IS" BASIS,
-@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM  See the License for the specific language governing permissions and
-@REM  limitations under the License.
-
-@echo off
-
-setlocal
-set PRGDIR=%~dp0%
-set BASE_DIR=%PRGDIR%..
-set APP=%BASE_DIR%\lib\shenyu-bootstrap.jar
-set LOG_DIR=%BASE_DIR%\logs
-
-if not defined JAVA_HOME (
- echo "Error: JAVA_HOME environment variable is not set."
- exit
-)
-
-set JAVA_OPTS=-server -Xmx2048m  -Xms2048m -Xmn1024m  -Xss512k
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+UseBiasedLocking
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+UseFastAccessorMethods
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+DisableExplicitGC
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParNewGC
-::set JAVA_OPTS=%JAVA_OPTS% -XX:ParallelGCThreads=20
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError
-::set JAVA_OPTS=%JAVA_OPTS% -XX:MaxGCPauseMillis=850
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetail
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+CMSParallelRemarkEnabled
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSCompactAtFullCollection
-::set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSInitiatingOccupancyOnly
-::set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75
-set JAVA_OPTS=%JAVA_OPTS% -Xloggc:%LOG_DIR%\gc.log
-
-if not exist %LOG_DIR% ( mkdir %LOG_DIR% )
-java %JAVA_OPTS% -jar %APP% --spring.config.location=file:%BASE_DIR%\conf\ >> "%LOG_DIR%\stdout.log"
-
-endlocal
+@rem
+@rem Licensed to the Apache Software Foundation (ASF) under one or more
+@rem contributor license agreements.  See the NOTICE file distributed with
+@rem this work for additional information regarding copyright ownership.
+@rem The ASF licenses this file to You under the Apache License, Version 2.0
+@rem (the "License"); you may not use this file except in compliance with
+@rem the License.  You may obtain a copy of the License at
+@rem
+@rem     http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@echo off & setlocal enabledelayedexpansion
+
+cd %~dp0
+
+set SERVER_NAME=ShenYu-Bootstrap
+
+set CLASS_PATH=".;..\conf;..\lib\*;..\ext-lib\*"
+
+set JAVA_OPTS=-server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70
+
+set MAIN_CLASS=org.apache.shenyu.bootstrap.ShenyuBootstrapApplication
+
+echo Starting the %SERVER_NAME% ...
+
+java %JAVA_OPTS% -Dfile.encoding=UTF-8 -classpath %CLASS_PATH% %MAIN_CLASS%
+
+pause
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.sh b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.sh
index e5c90b5..8bb5948 100644
--- a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.sh
+++ b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.sh
@@ -1,12 +1,11 @@
 #!/bin/bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
 #
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
@@ -15,54 +14,35 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+#
 
-if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
-    JAVA="$JAVA_HOME/bin/java"
-elif type -p java; then
-    JAVA=java
-else
-    echo "Error: JAVA_HOME environment variable is not set." 1>&2
-    exit 1
-fi
-
-PRG_DIR=$(cd `dirname $0`; pwd)
-
-BASE_DIR=$(cd $PRG_DIR/.. ; pwd)
-
-APP="$BASE_DIR/lib/shenyu-bootstrap.jar"
-
-[[ -z "$LOG_DIR" ]] && LOG_DIR="$BASE_DIR/logs"
-[[ -d "$LOG_DIR" ]] || mkdir -p "$LOG_DIR"
+SERVER_NAME=ShenYu-Bootstrap
 
-PID_FILE="$LOG_DIR/shenyu-bootstrap.pid"
+cd `dirname $0`
+cd ..
+DEPLOY_DIR=`pwd`
 
-JAVA_MEM_OPTS="-Xmx2048m -Xms2048m -Xmn1024m -Xss512k"
+LOGS_DIR=${DEPLOY_DIR}/logs
+if [ ! -d ${LOGS_DIR} ]; then
+    mkdir ${LOGS_DIR}
+fi
 
-JAVA_GC_TUNE_OPTS="
-  -XX:+UseParNewGC \
-  -XX:+UseConcMarkSweepGC \
-  -XX:+CMSParallelRemarkEnabled \
-  -XX:+UseCMSInitiatingOccupancyOnly \
-  -XX:MaxGCPauseMillis=850 \
-  -XX:ParallelGCThreads=20 \
-  -XX:CMSInitiatingOccupancyFraction=75 \
-  -XX:+AggressiveOpts \
-  -XX:+UseBiasedLocking \
-  -XX:+DisableExplicitGC \
-  -XX:+UseFastAccessorMethods \
-  -XX:+HeapDumpOnOutOfMemoryError \
-  "
-#  -XX:+PrintGCDetail
-#  -XX:+UseCMSCompactAtFullCollection
+LOG_FILES=${LOGS_DIR}
+EXT_LIB=${DEPLOY_DIR}/ext-lib
 
-JAVA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/gc.log"
+PIDS=`ps -ef | grep java | grep "$DEPLOY_DIR" | grep -v grep | awk '{print $2}'`
+if [ -n "$PIDS" ]; then
+    echo "ERROR: The $SERVER_NAME already started!"
+    echo "PID: $PIDS"
+    exit 1
+fi
 
-JAVA_OPTS="$JAVA_OPTS $JAVA_MEM_OPTS $JAVA_GC_TUNE_OPTS $JAVA_GC_LOG_OPTS"
+CLASS_PATH=.:${DEPLOY_DIR}/conf:${DEPLOY_DIR}/lib/*:${EXT_LIB}/*
+JAVA_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
 
-$JAVA $JAVA_OPTS -jar $APP --spring.config.location=file:"$BASE_DIR"/conf/  >> "${LOG_DIR}"/shenyu-bootstrap.out 2>&1 &
+MAIN_CLASS=org.apache.shenyu.bootstrap.ShenyuBootstrapApplication
+echo "Starting the $SERVER_NAME ..."
 
-if [ $? -gt 0 ]; then
-    echo "Starting $APP ERROR"
-fi
-    echo "Starting $APP OK"
-echo $! > "$PID_FILE"
+nohup java ${JAVA_OPTS} -classpath ${CLASS_PATH} ${MAIN_CLASS} >/dev/null 2>&1 &
+sleep 1
+echo "Please check the log files: $LOG_FILES"
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/stop.sh b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/stop.sh
new file mode 100644
index 0000000..f594134
--- /dev/null
+++ b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/stop.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SERVER_NAME=ShenYu-Bootstrap
+
+cd `dirname $0`
+cd ..
+DEPLOY_DIR=`pwd`
+
+PIDS=`ps -ef | grep java | grep "$DEPLOY_DIR" | grep -v grep |awk '{print $2}'`
+if [ -z "$PIDS" ]; then
+    echo "ERROR: The $SERVER_NAME does not started!"
+    exit 1
+fi
+
+echo -e "Stopping the $SERVER_NAME ...\c"
+for PID in ${PIDS} ; do
+    kill ${PID} > /dev/null 2>&1
+done
+
+COUNT=0
+while [ ${COUNT} -lt 1 ]; do
+    echo -e ".\c"
+    sleep 1
+    COUNT=1
+    for PID in ${PIDS} ; do
+        PID_EXIST=`ps -f -p ${PID} | grep java`
+        if [ -n "$PID_EXIST" ]; then
+            COUNT=0
+            break
+        fi
+    done
+done
+
+echo "OK!"
+echo "PID: $PIDS"
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/logback.xml b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/logback.xml
new file mode 100644
index 0000000..3e087d1
--- /dev/null
+++ b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/logback.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+
+    <shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook"/>
+    <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener"/>
+    <property name="LOG_HOME" value="${log.home:-./logs}"/>
+    <property name="LOG_APP_NAME" value="${log.app-name:-shenyu-bootstrap}"/>
+    <property name="MAX_SINGLE_LOG_FILE_SIZE" value="${log.max-single-log-file-size:-100MB}"/>
+    <property name="MAX_LOG_FILE_HISTORY" value="${log.max-log-file-history:-7}"/>
+    <property name="LOG_FILE_TOTAL_CAPACITY" value="${log.log-file-total-capacity:-10GB}"/>
+    <property name="ASYNC_DISCARDING_THRESHOLD" value="${log.async.discarding-threshold:-0}"/>
+    <property name="ASYNC_LOG_QUEUE_SIZE" value="${log.async.queue-size:-256}"/>
+
+    <property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger - %msg%n"/>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="ASYNC_STDOUT" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>${ASYNC_DISCARDING_THRESHOLD}</discardingThreshold>
+        <queueSize>${ASYNC_LOG_QUEUE_SIZE}</queueSize>
+        <includeCallerData>true</includeCallerData>
+        <appender-ref ref="STDOUT"/>
+    </appender>
+
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${LOG_HOME}/${LOG_APP_NAME}.log</file>
+        <append>true</append>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${LOG_HOME}/logs/${LOG_APP_NAME}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
+            <maxFileSize>${MAX_SINGLE_LOG_FILE_SIZE}</maxFileSize>
+            <maxHistory>${MAX_LOG_FILE_HISTORY}</maxHistory>
+            <totalSizeCap>${LOG_FILE_TOTAL_CAPACITY}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="ASYNC_FILE" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>${ASYNC_DISCARDING_THRESHOLD}</discardingThreshold>
+        <queueSize>${ASYNC_LOG_QUEUE_SIZE}</queueSize>
+        <includeCallerData>true</includeCallerData>
+        <appender-ref ref="FILE"/>
+    </appender>
+
+    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>ERROR</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+        <file>${LOG_HOME}/${LOG_APP_NAME}-error.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${LOG_HOME}/logs/${LOG_APP_NAME}.%d{yyyy-MM-dd}-error.%i.log.zip</fileNamePattern>
+            <maxFileSize>${MAX_SINGLE_LOG_FILE_SIZE}</maxFileSize>
+            <maxHistory>${MAX_LOG_FILE_HISTORY}</maxHistory>
+            <totalSizeCap>${LOG_FILE_TOTAL_CAPACITY}</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="ASYNC_ERROR_FILE" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>${ASYNC_DISCARDING_THRESHOLD}</discardingThreshold>
+        <queueSize>${ASYNC_LOG_QUEUE_SIZE}</queueSize>
+        <includeCallerData>true</includeCallerData>
+        <appender-ref ref="ERROR_FILE"/>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="ASYNC_STDOUT"/>
+        <appender-ref ref="ASYNC_FILE"/>
+        <appender-ref ref="ASYNC_ERROR_FILE"/>
+    </root>
+</configuration>
\ No newline at end of file