Update: merge

This commit is contained in:
王彦民 2018-12-13 14:18:22 +08:00
commit 5490501838
38 changed files with 1139 additions and 1046 deletions

16
.editorconfig Normal file
View File

@ -0,0 +1,16 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[{package.json,.travis.yml}]
indent_size = 2

View File

@ -1,3 +1,89 @@
## 0.6.0(Dec, 2018)
[#388] Cluster name should be provided in the Instance
[#377] Clean up messy code in Naming module
[#369] Support instance list persisted on disk
[#366] findbugs-maven-plugin version
[#362] The metadata will lost when online or offline instance through web ui
[#352] Refactoring internationalization Nacos console
[#278] Nacos docker img
[#243] optimize the efficiency of integration testing, its taking too long now
## 0.5.0(Nov, 2018)
[#148] Naming write performace.
[#175] Support deregistering instance automatically.
[#176] Naming client query instance method should bypass local cache at client start.
[#177] Console supports registering new empty service and delete empty service.
[#181] NPE when adding a instance if no leader in the raft cluster.
[#193] Configure host domain name cause nacos server cluster is unavailable.
[#209] Disable service and cluster level customization in client registerInstance method.
[#214] Please support Java 11.
[#222] print more nacos server start status info in start.log.
[#231] Refactoring: Parsing the Nacos home directory and the cluster.conf file.
[#246] "mvn -B clean apache-rat:check findbugs:findbugs" did not work as expected.
[#251] Console Editor Optimization.
[#254] DataId and group are required in historical version and listener query.
[#256] Whether the service discovery data needs to add a newline link symbol.
[#257] Listening query switching query dimension data is not refreshed.
[#258] Remove the Balloon of DataId/Group.
[#259] Listening query paging size problem.
[#272] "#it is ip" is also parsed into an instance IP.
[#275] nacos coredns plugin to support DNS.
[#281] We should lint the console code.
[#302] Maven build project supports java 11.
[#316] In stand alone mode, Nacos still checks the cluster.conf.
## 0.4.0(Nov 7, 2018)
[#216] Fix tenant dir problem
[#197] Service update ignored some properties
[#190] Client beat lose weight info and metadata info
[#188] Console delete data cannot be updated in time
[#179] Listening query fail when namespace is not blank
[#157] Lack information in readme.md to describe the related project repositories for Nacos echosystem
[#144] There have a error and something are not clear
[#106] Snapshot file create error
[#92] Eliminate warnings, refactor code, show start.log detail
## 0.3.0(Oct 26, 2018)
[#171] UI debug errors
[#156] Web UI 404 problem
[#155] use local resource
[#145] nacos-example not found :org.apache.logging.log4j.core.Logger
[#142] UI console show Group
[#149] Fix naming client beat process failed bug.
[#150] Fix naming service registration hangs bug.
## 0.3.0-RC1(Oct 19, 2018)
[#33] Support console for config management.
[#51] Support console for naming service.
[#121] Fix get instance method hanging bug.
[#138] Add a flag to indicate if instance is offline.
[#130] Fix health check disabled if machine has one CPU core bug.
[#139] Fix still get instance with zero weight bug.
[#128] Fix console layout bug.
## 0.2.1-release(Sept 28, 2018)
* FIx deregister last instance failed error.
* Fix url pattern error.
* Fully integrate with and seamlessly support Spring framework, Spring Boot and Spring Cloud
* Separate nacos-api from nacos client implementation
* Support high available cluster mode
* Fix cluster node health check abnormality
* Fix stand-alone mode gets the change history list exception
* Fix Pulling does not exist configuration print io exception
* Optimized log framework
* Service Discovery: Client support getting server status.
* Service Discovery: Client support get all service names of server.
* Service Discovery: Client support get all subscribed services.
## 0.2.0 (Sept 17, 2018) ## 0.2.0 (Sept 17, 2018)
#### FEATURES: #### FEATURES:

View File

@ -40,9 +40,9 @@ It is super easy to get started with your first project.
You can download the package from the [latest stable release](https://github.com/alibaba/nacos/releases). You can download the package from the [latest stable release](https://github.com/alibaba/nacos/releases).
Take release nacos-server-0.5.0.zip for example. Take release nacos-server-0.6.0.zip for example.
``` ```
unzip nacos-server-0.5.0.zip unzip nacos-server-0.6.0.zip
cd nacos/bin cd nacos/bin
``` ```

View File

@ -12,55 +12,55 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>nacos-api</artifactId> <artifactId>nacos-api</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>nacos-api ${project.version}</name> <name>nacos-api ${project.version}</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>7</source> <source>7</source>
<target>7</target> <target>7</target>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -16,7 +16,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -66,8 +66,8 @@ public class ParseException extends Exception {
} }
/** /**
* @return One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character * @return One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character
* ERROR_UNEXPECTED_TOKEN com.alibaba.nacos.client.logger.jsonparser.Yytoken ERROR_UNEXPECTED_EXCEPTION * ERROR_UNEXPECTED_TOKEN com.alibaba.nacos.client.logger.jsonparser.Yytoken ERROR_UNEXPECTED_EXCEPTION
* java.lang.Exception * java.lang.Exception
* @see com.alibaba.nacos.client.logger.json.parser.Yytoken * @see com.alibaba.nacos.client.logger.json.parser.Yytoken
*/ */

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -12,175 +12,175 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>nacos-config</artifactId> <artifactId>nacos-config</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>nacos-config ${project.version}</name> <name>nacos-config ${project.version}</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>nacos-core</artifactId> <artifactId>nacos-core</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
</dependency> </dependency>
<!--<dependency>--> <!--<dependency>-->
<!--<groupId>taglibs</groupId>--> <!--<groupId>taglibs</groupId>-->
<!--<artifactId>standard</artifactId>--> <!--<artifactId>standard</artifactId>-->
<!--</dependency>--> <!--</dependency>-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId> <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-lang</groupId> <groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId> <artifactId>commons-lang</artifactId>
<version>2.6</version> <version>2.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-dbcp</groupId> <groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId> <artifactId>commons-dbcp</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId> <artifactId>derby</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
</dependency> </dependency>
<!-- for aop --> <!-- for aop -->
<dependency> <dependency>
<groupId>org.aspectj</groupId> <groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId> <artifactId>aspectjrt</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cglib</groupId> <groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId> <artifactId>cglib-nodep</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId> <artifactId>httpasyncclient</artifactId>
</dependency> </dependency>
<!-- Provided --> <!-- Provided -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId> <artifactId>spring-boot-starter-tomcat</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.codehaus.jackson</groupId> <groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-lgpl</artifactId> <artifactId>jackson-mapper-lgpl</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.jcip</groupId> <groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId> <artifactId>jcip-annotations</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.spotbugs</groupId> <groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId> <artifactId>spotbugs-annotations</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<skipTests>true</skipTests> <skipTests>true</skipTests>
<argLine>-Dnacos.standalone=true</argLine> <argLine>-Dnacos.standalone=true</argLine>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<archive> <archive>
<manifest> <manifest>
<mainClass>com.alibaba.nacos.config.server.Config</mainClass> <mainClass>com.alibaba.nacos.config.server.Config</mainClass>
</manifest> </manifest>
</archive> </archive>
<descriptorRefs> <descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef> <descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs> </descriptorRefs>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
<!-- <resources> <!-- <resources>
<resource> <resource>
<filtering>true</filtering> <filtering>true</filtering>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<excludes> <excludes>
<exclude>application.properties</exclude> <exclude>application.properties</exclude>
<exclude>banner.txt</exclude> <exclude>banner.txt</exclude>
<exclude>schema.sql</exclude> <exclude>schema.sql</exclude>
<exclude>nacos-db.sql</exclude> <exclude>nacos-db.sql</exclude>
</excludes> </excludes>
</resource> </resource>
</resources> --> </resources> -->
</build> </build>
<profiles> <profiles>
<profile> <profile>
<id>springboot</id> <id>springboot</id>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-core</artifactId> <artifactId>nacos-core</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<mainClass>com.alibaba.nacos.config.server.Config</mainClass> <mainClass>com.alibaba.nacos.config.server.Config</mainClass>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
<finalName>nacos-config</finalName> <finalName>nacos-config</finalName>
</build> </build>
</profile> </profile>
</profiles> </profiles>
</project> </project>

View File

@ -24,6 +24,7 @@ import javax.servlet.ServletContext;
/** /**
* Running config * Running config
*
* @author <a href="mailto:zpf.073@gmail.com">nkorange</a> * @author <a href="mailto:zpf.073@gmail.com">nkorange</a>
*/ */
@Component @Component
@ -32,18 +33,18 @@ public class RunningConfigUtils implements ApplicationListener<WebServerInitiali
private static int serverPort; private static int serverPort;
private static String contextPath; private static String contextPath;
private static String clusterName = "serverlist"; private static String clusterName = "serverlist";
@Autowired @Autowired
private ServletContext servletContext; private ServletContext servletContext;
@Override @Override
public void onApplicationEvent(WebServerInitializedEvent event) { public void onApplicationEvent(WebServerInitializedEvent event) {
setServerPort(event.getWebServer().getPort()); setServerPort(event.getWebServer().getPort());
setContextPath(servletContext.getContextPath()); setContextPath(servletContext.getContextPath());
} }
public static int getServerPort() { public static int getServerPort() {
return serverPort; return serverPort;
@ -52,17 +53,17 @@ public class RunningConfigUtils implements ApplicationListener<WebServerInitiali
public static String getContextPath() { public static String getContextPath() {
return contextPath; return contextPath;
} }
public static String getClusterName() { public static String getClusterName() {
return clusterName; return clusterName;
} }
public static void setServerPort(int serverPort) { public static void setServerPort(int serverPort) {
RunningConfigUtils.serverPort = serverPort; RunningConfigUtils.serverPort = serverPort;
} }
public static void setContextPath(String contextPath) {
RunningConfigUtils.contextPath = contextPath;
}
public static void setContextPath(String contextPath) {
RunningConfigUtils.contextPath = contextPath;
}
} }

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<included> <included>
<springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${user.home}/nacos/logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<appender name="dumpFile" <appender name="dumpFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-dump.log</file> <file>${LOG_HOME}/config-dump.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -13,15 +15,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="pullFile" <appender name="pullFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-pull.log</file> <file>${LOG_HOME}/config-pull.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -29,15 +31,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="fatalFile" <appender name="fatalFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-fatal.log</file> <file>${LOG_HOME}/config-fatal.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -45,15 +47,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="memoryFile" <appender name="memoryFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-memory.log</file> <file>${LOG_HOME}/config-memory.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -61,15 +63,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="pullCheckFile" <appender name="pullCheckFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-pull-check.log</file> <file>${LOG_HOME}/config-pull-check.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -77,16 +79,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%msg%n</Pattern> <Pattern>%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="aclLog" <appender name="aclLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-acl.log</file> <file>${LOG_HOME}/config-acl.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -94,16 +96,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="clientLog" <appender name="clientLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-client-request.log</file> <file>${LOG_HOME}/config-client-request.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -111,16 +113,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="sdkLog" <appender name="sdkLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-sdk-request.log</file> <file>${LOG_HOME}/config-sdk-request.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -128,16 +130,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="traceLog" <appender name="traceLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-trace.log</file> <file>${LOG_HOME}/config-trace.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -145,16 +147,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="notifyLog" <appender name="notifyLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-notify.log</file> <file>${LOG_HOME}/config-notify.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -162,16 +164,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="appCollectorLog" <appender name="appCollectorLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-app.log</file> <file>${LOG_HOME}/config-app.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-app.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-app.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -179,16 +181,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="startLog" <appender name="startLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/config-server.log</file> <file>${LOG_HOME}/config-server.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/config-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -196,7 +198,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>

View File

@ -41,27 +41,27 @@ import com.alibaba.nacos.config.server.service.DataSourceService;
@ContextConfiguration(classes = MockServletContext.class) @ContextConfiguration(classes = MockServletContext.class)
@WebAppConfiguration @WebAppConfiguration
public class HealthControllerUnitTest { public class HealthControllerUnitTest {
@InjectMocks @InjectMocks
HealthController healthController; HealthController healthController;
@Mock @Mock
DataSourceService dataSourceService; DataSourceService dataSourceService;
private MockMvc mockmvc;
private MockMvc mockmvc;
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
mockmvc = MockMvcBuilders.standaloneSetup(healthController).build(); mockmvc = MockMvcBuilders.standaloneSetup(healthController).build();
} }
@Test @Test
public void testGetHealth() throws Exception{ public void testGetHealth() throws Exception {
Mockito.when(dataSourceService.getHealth()).thenReturn("UP");
MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH);
String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString();
Assert.assertEquals("UP", actualValue);
Mockito.when(dataSourceService.getHealth()).thenReturn("UP");
MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH);
String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString();
Assert.assertEquals("UP", actualValue);
} }
} }

View File

@ -15,30 +15,28 @@
*/ */
package com.alibaba.nacos.config.server.service; package com.alibaba.nacos.config.server.service;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.service.AggrWhitelist; import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
public class AggrWhitelistTest { public class AggrWhitelistTest {
AggrWhitelist service; AggrWhitelist service;
@Before @Before
public void before() throws Exception { public void before() throws Exception {
service = new AggrWhitelist(); service = new AggrWhitelist();
} }
@Test @Test
public void testIsAggrDataId() { public void testIsAggrDataId() {
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
@ -46,12 +44,12 @@ public class AggrWhitelistTest {
list.add("NS_NACOS_SUBSCRIPTION_TOPIC_*"); list.add("NS_NACOS_SUBSCRIPTION_TOPIC_*");
list.add("com.taobao.tae.AppListOnGrid-*"); list.add("com.taobao.tae.AppListOnGrid-*");
service.compile(list); service.compile(list);
assertEquals(false, service.isAggrDataId("com.abc")); assertEquals(false, service.isAggrDataId("com.abc"));
assertEquals(false, service.isAggrDataId("com.taobao.jiuren")); assertEquals(false, service.isAggrDataId("com.taobao.jiuren"));
assertEquals(false, service.isAggrDataId("com.taobao.jiurenABC")); assertEquals(false, service.isAggrDataId("com.taobao.jiurenABC"));
assertEquals(true, service.isAggrDataId("com.taobao.jiuren.abc")); assertEquals(true, service.isAggrDataId("com.taobao.jiuren.abc"));
assertEquals(true, service.isAggrDataId("NS_NACOS_SUBSCRIPTION_TOPIC_abc")); assertEquals(true, service.isAggrDataId("NS_NACOS_SUBSCRIPTION_TOPIC_abc"));
assertEquals(true, service.isAggrDataId("com.taobao.tae.AppListOnGrid-abc")); assertEquals(true, service.isAggrDataId("com.taobao.tae.AppListOnGrid-abc"));
} }
} }

View File

@ -15,19 +15,14 @@
*/ */
package com.alibaba.nacos.config.server.service; package com.alibaba.nacos.config.server.service;
import com.alibaba.nacos.config.server.utils.GroupKey2;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.service.ClientTrackService;
import com.alibaba.nacos.config.server.service.ConfigService;
import com.alibaba.nacos.config.server.utils.GroupKey2;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
public class ClientTrackServiceTest { public class ClientTrackServiceTest {
@ -44,7 +39,7 @@ public class ClientTrackServiceTest {
String group = "online"; String group = "online";
String groupKey = GroupKey2.getKey(dataId, group); String groupKey = GroupKey2.getKey(dataId, group);
String md5 = "xxxxxxxxxxxxx"; String md5 = "xxxxxxxxxxxxx";
ConfigService.updateMd5(groupKey, md5, System.currentTimeMillis()); ConfigService.updateMd5(groupKey, md5, System.currentTimeMillis());
ClientTrackService.trackClientMd5(clientIp, groupKey, md5); ClientTrackService.trackClientMd5(clientIp, groupKey, md5);
@ -53,7 +48,7 @@ public class ClientTrackServiceTest {
Assert.assertEquals(true, ClientTrackService.isClientUptodate(clientIp).get(groupKey)); Assert.assertEquals(true, ClientTrackService.isClientUptodate(clientIp).get(groupKey));
Assert.assertEquals(1, ClientTrackService.subscribeClientCount()); Assert.assertEquals(1, ClientTrackService.subscribeClientCount());
Assert.assertEquals(1, ClientTrackService.subscriberCount()); Assert.assertEquals(1, ClientTrackService.subscriberCount());
//服务端数据更新 //服务端数据更新
ConfigService.updateMd5(groupKey, md5 + "111", System.currentTimeMillis()); ConfigService.updateMd5(groupKey, md5 + "111", System.currentTimeMillis());
Assert.assertEquals(false, ClientTrackService.isClientUptodate(clientIp).get(groupKey)); Assert.assertEquals(false, ClientTrackService.isClientUptodate(clientIp).get(groupKey));

View File

@ -17,50 +17,46 @@ package com.alibaba.nacos.config.server.service;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.service.DiskUtil;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import static org.junit.Assert.assertEquals;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
public class DiskServiceUnitTest { public class DiskServiceUnitTest {
private DiskUtil diskService; private DiskUtil diskService;
private ServletContext servletContext; private ServletContext servletContext;
private File tempFile; private File tempFile;
private String path; private String path;
@Before @Before
public void setUp() throws IOException { public void setUp() throws IOException {
this.tempFile = File.createTempFile("diskServiceTest", "tmp"); this.tempFile = File.createTempFile("diskServiceTest", "tmp");
this.path = tempFile.getParent(); this.path = tempFile.getParent();
this.diskService = new DiskUtil(); this.diskService = new DiskUtil();
} }
@Test @Test
public void testCreateConfig() throws IOException { public void testCreateConfig() throws IOException {
diskService.saveToDisk("testDataId", "testGroup", "testTenant", "testContent"); diskService.saveToDisk("testDataId", "testGroup", "testTenant", "testContent");
String content = diskService.getConfig("testDataId", "testGroup", "testTenant"); String content = diskService.getConfig("testDataId", "testGroup", "testTenant");
assertEquals(content, "testContent"); assertEquals(content, "testContent");
} }
@After @After
public void tearDown() throws IOException { public void tearDown() throws IOException {
tempFile.delete(); tempFile.delete();
} }
} }

View File

@ -50,7 +50,7 @@ public class GroupKeyTest {
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
System.out.println(e.toString()); System.out.println(e.toString());
} }
key = "11111%2b+222"; key = "11111%2b+222";
try { try {
GroupKey2.parseKey(key); GroupKey2.parseKey(key);
@ -58,7 +58,6 @@ public class GroupKeyTest {
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
System.out.println(e.toString()); System.out.println(e.toString());
} }
key = "11111%25+222"; key = "11111%25+222";
String[] pair = GroupKey2.parseKey(key); String[] pair = GroupKey2.parseKey(key);

View File

@ -24,7 +24,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.utils.SimpleReadWriteLock; import com.alibaba.nacos.config.server.utils.SimpleReadWriteLock;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
public class SimpleReadWriteLockTest { public class SimpleReadWriteLockTest {
@ -34,44 +33,44 @@ public class SimpleReadWriteLockTest {
SimpleReadWriteLock lock = new SimpleReadWriteLock(); SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock()); assertEquals(true, lock.tryReadLock());
assertEquals(true, lock.tryReadLock()); assertEquals(true, lock.tryReadLock());
lock.releaseReadLock(); lock.releaseReadLock();
lock.releaseReadLock(); lock.releaseReadLock();
assertEquals(true, lock.tryWriteLock()); assertEquals(true, lock.tryWriteLock());
} }
@Test @Test
public void test_加写锁() { public void test_加写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock(); SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryWriteLock()); assertEquals(true, lock.tryWriteLock());
lock.releaseWriteLock(); lock.releaseWriteLock();
} }
@Test @Test
public void test_双重写锁() { public void test_双重写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock(); SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryWriteLock()); assertEquals(true, lock.tryWriteLock());
assertEquals(false, lock.tryWriteLock()); assertEquals(false, lock.tryWriteLock());
} }
@Test @Test
public void test_先读锁后写锁() { public void test_先读锁后写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock(); SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock()); assertEquals(true, lock.tryReadLock());
assertEquals(false, lock.tryWriteLock()); assertEquals(false, lock.tryWriteLock());
} }
@Test @Test
public void test_双重读锁_释放一个_加写锁失败() { public void test_双重读锁_释放一个_加写锁失败() {
SimpleReadWriteLock lock = new SimpleReadWriteLock(); SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock()); assertEquals(true, lock.tryReadLock());
assertEquals(true, lock.tryReadLock()); assertEquals(true, lock.tryReadLock());
lock.releaseReadLock(); lock.releaseReadLock();
assertEquals(false, lock.tryWriteLock()); assertEquals(false, lock.tryWriteLock());
} }
} }

View File

@ -32,7 +32,6 @@ import java.util.concurrent.CountDownLatch;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
public class EventDispatcherTest { public class EventDispatcherTest {
@ -46,10 +45,10 @@ public class EventDispatcherTest {
@Test @Test
public void testAddListener() throws Exception { public void testAddListener() throws Exception {
final AbstractEventListener listener = new MockListener(); final AbstractEventListener listener = new MockListener();
int vusers = 1000; int vusers = 1000;
final CountDownLatch latch = new CountDownLatch(vusers); final CountDownLatch latch = new CountDownLatch(vusers);
for (int i = 0; i < vusers; ++i) { for (int i = 0; i < vusers; ++i) {
new Thread(new Runnable() { new Thread(new Runnable() {
public void run() { public void run() {
@ -58,33 +57,32 @@ public class EventDispatcherTest {
} }
}).start(); }).start();
} }
latch.await(); latch.await();
assertEquals(1, EventDispatcher.LISTENER_HUB.size()); assertEquals(1, EventDispatcher.LISTENER_HUB.size());
} }
@Test @Test
public void testFireEvent() { public void testFireEvent() {
EventDispatcher.fireEvent(new MockEvent()); EventDispatcher.fireEvent(new MockEvent());
assertEquals(0, MockListener.count); assertEquals(0, MockListener.count);
EventDispatcher.addEventListener(new MockListener()); EventDispatcher.addEventListener(new MockListener());
EventDispatcher.fireEvent(new MockEvent()); EventDispatcher.fireEvent(new MockEvent());
assertEquals(1, MockListener.count); assertEquals(1, MockListener.count);
EventDispatcher.fireEvent(new MockEvent()); EventDispatcher.fireEvent(new MockEvent());
assertEquals(2, MockListener.count); assertEquals(2, MockListener.count);
} }
} }
class MockEvent implements Event {
class MockEvent implements Event {
} }
class MockListener extends AbstractEventListener { class MockListener extends AbstractEventListener {
static int count = 0; static int count = 0;
@Override @Override
public List<Class<? extends Event>> interest() { public List<Class<? extends Event>> interest() {
List<Class<? extends Event>> types = new ArrayList<Class<? extends Event>>(); List<Class<? extends Event>> types = new ArrayList<Class<? extends Event>>();

View File

@ -12,37 +12,37 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
</parent> </parent>
<artifactId>nacos-console</artifactId> <artifactId>nacos-console</artifactId>
<!--<packaging>war</packaging>--> <!--<packaging>war</packaging>-->
<packaging>jar</packaging> <packaging>jar</packaging>
<name>nacos-console ${project.version}</name> <name>nacos-console ${project.version}</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>nacos-config</artifactId> <artifactId>nacos-config</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.tomcat.embed</groupId> <groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId> <artifactId>tomcat-embed-jasper</artifactId>
<version>7.0.59</version> <version>7.0.59</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>nacos-naming</artifactId> <artifactId>nacos-naming</artifactId>
</dependency> </dependency>
<!-- log --> <!-- log -->
<!-- log4j通过slf4j来代理 --> <!-- log4j通过slf4j来代理 -->
<dependency> <dependency>
@ -59,42 +59,30 @@
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId> <artifactId>jul-to-slf4j</artifactId>
</dependency> </dependency>
<!-- log --> <!-- log -->
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>nacos-server</finalName> <finalName>nacos-server</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<mainClass>com.alibaba.nacos.Nacos</mainClass> <mainClass>com.alibaba.nacos.Nacos</mainClass>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<goals> <goals>
<goal>repackage</goal> <goal>repackage</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<!--<resources>--> </build>
<!--<resource>-->
<!--<filtering>true</filtering>-->
<!--<directory>src/main/resources</directory>-->
<!--<excludes>-->
<!--<exclude>application.properties</exclude>-->
<!--<exclude>banner.txt</exclude>-->
<!--<exclude>diamond-server-logback.xml</exclude>-->
<!--<exclude>schema.sql</exclude>-->
<!--</excludes>-->
<!--</resource>-->
<!--</resources>-->
</build>
</project> </project>

View File

@ -1,205 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="10 seconds"> <configuration scan="true" scanPeriod="10 seconds">
<springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${user.home}/diamond/logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<appender name="dumpFile" <appender name="dumpFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/dump.log</file> <file>${LOG_HOME}/dump.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="pullFile" <appender name="pullFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/pull.log</file> <file>${LOG_HOME}/pull.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="fatalFile" <appender name="fatalFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/fatal.log</file> <file>${LOG_HOME}/fatal.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="memoryFile" <appender name="memoryFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/memory.log</file> <file>${LOG_HOME}/memory.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="pullCheckFile" <appender name="pullCheckFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/pull-check.log</file> <file>${LOG_HOME}/pull-check.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%msg%n</Pattern> <Pattern>%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="aclLog" <appender name="aclLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/acl.log</file> <file>${LOG_HOME}/acl.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="clientLog" <appender name="clientLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/client-request.log</file> <file>${LOG_HOME}/client-request.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="sdkLog" <appender name="sdkLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/sdk-request.log</file> <file>${LOG_HOME}/sdk-request.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="traceLog" <appender name="traceLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/trace.log</file> <file>${LOG_HOME}/trace.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="notifyLog" <appender name="notifyLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/notify.log</file> <file>${LOG_HOME}/notify.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="appCollectorLog" <appender name="appCollectorLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/app.log</file> <file>${LOG_HOME}/app.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/app.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/app.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="rootFile" <appender name="rootFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/diamondServer.log</file> <file>${LOG_HOME}/diamondServer.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/diamondServer.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/diamondServer.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart> <cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
@ -253,7 +256,7 @@
<level value="INFO" /> <level value="INFO" />
<appender-ref ref="appCollectorLog" /> <appender-ref ref="appCollectorLog" />
</logger> </logger>
<root> <root>
<level value="INFO" /> <level value="INFO" />
<appender-ref ref="rootFile" /> <appender-ref ref="rootFile" />

View File

@ -545,7 +545,7 @@ module.exports = {
'com.alibaba.nacos.page.serviceDetail.edit_service': '编辑服务', 'com.alibaba.nacos.page.serviceDetail.edit_service': '编辑服务',
'com.alibaba.nacos.page.serviceDetail.back': '返回', 'com.alibaba.nacos.page.serviceDetail.back': '返回',
'com.alibaba.nacos.page.serviceDetail.service_name': '服务名', 'com.alibaba.nacos.page.serviceDetail.service_name': '服务名',
'com.alibaba.nacos.page.serviceDetail.protect_threshold': '保护值', 'com.alibaba.nacos.page.serviceDetail.protect_threshold': '保护值',
'com.alibaba.nacos.page.serviceDetail.health_check_pattern': '健康检查模式', 'com.alibaba.nacos.page.serviceDetail.health_check_pattern': '健康检查模式',
'com.alibaba.nacos.page.serviceDetail.health_check_pattern.service': '服务端', 'com.alibaba.nacos.page.serviceDetail.health_check_pattern.service': '服务端',
'com.alibaba.nacos.page.serviceDetail.health_check_pattern.client': '客户端', 'com.alibaba.nacos.page.serviceDetail.health_check_pattern.client': '客户端',

View File

@ -95,7 +95,7 @@ request.middleWare((_config = {}) => {
* 配置 monaco * 配置 monaco
*/ */
window.require.config({ window.require.config({
paths: { vs: 'js/vs' }, paths: { vs: process.env.NODE_ENV === 'production' ? 'console-fe/public/js/vs' : 'js/vs' },
}); });
window.require.config({ window.require.config({
'vs/nls': { 'vs/nls': {

View File

@ -95,7 +95,7 @@ const I18N_CONF = {
cluster: '集群', cluster: '集群',
metadata: '元数据', metadata: '元数据',
healthCheckPattern: '健康检查模式', healthCheckPattern: '健康检查模式',
protectThreshold: '保护值', protectThreshold: '保护值',
serviceName: '服务名', serviceName: '服务名',
editService: '编辑服务', editService: '编辑服务',
}, },
@ -104,7 +104,7 @@ const I18N_CONF = {
updateService: '更新服务', updateService: '更新服务',
serviceName: '服务名', serviceName: '服务名',
metadata: '元数据', metadata: '元数据',
protectThreshold: '保护值', protectThreshold: '保护值',
healthCheckPattern: '健康检查模式', healthCheckPattern: '健康检查模式',
healthCheckPatternService: '服务端', healthCheckPatternService: '服务端',
healthCheckPatternClient: '客户端', healthCheckPatternClient: '客户端',

View File

@ -62,7 +62,9 @@ class ServiceList extends React.Component {
} }
openEditServiceDialog() { openEditServiceDialog() {
this.editServiceDialog.current.show(this.state.service); try {
this.editServiceDialog.current.getInstance().show(this.state.service);
} catch (error) {}
} }
queryServiceList() { queryServiceList() {

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${user.home}/nacos/logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="META-INF/logback/nacos-included.xml"/> <include resource="META-INF/logback/nacos-included.xml"/>
@ -8,16 +11,16 @@
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern> <pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="rootFile" <appender name="rootFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/nacos.log</file> <file>${LOG_HOME}/nacos.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -25,7 +28,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>

View File

@ -1,19 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="10 seconds"> <configuration scan="true" scanPeriod="10 seconds">
<springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${nacos.home}/logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>utf8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="naming-server" <appender name="naming-server"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-server.log</file> <file>${LOG_HOME}/naming-server.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -34,10 +37,10 @@
<appender name="naming-raft" <appender name="naming-raft"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-raft.log</file> <file>${LOG_HOME}/naming-raft.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -58,10 +61,10 @@
<appender name="naming-event" <appender name="naming-event"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-event.log</file> <file>${LOG_HOME}/naming-event.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-event.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-event.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -82,10 +85,10 @@
<appender name="naming-push" <appender name="naming-push"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-push.log</file> <file>${LOG_HOME}/naming-push.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-push.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-push.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -98,10 +101,10 @@
</appender> </appender>
<appender name="naming-rt" <appender name="naming-rt"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-rt.log</file> <file>${LOG_HOME}/naming-rt.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-rt.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-rt.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -115,10 +118,10 @@
<appender name="naming-performance" <appender name="naming-performance"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-performance.log</file> <file>${LOG_HOME}/naming-performance.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-performance.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-performance.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -132,10 +135,10 @@
<appender name="naming-router" <appender name="naming-router"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-router.log</file> <file>${LOG_HOME}/naming-router.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-router.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-router.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -149,10 +152,10 @@
<appender name="naming-cache" <appender name="naming-cache"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-cache.log</file> <file>${LOG_HOME}/naming-cache.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-cache.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-cache.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -166,10 +169,10 @@
<appender name="naming-device" <appender name="naming-device"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-device.log</file> <file>${LOG_HOME}/naming-device.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-device.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-device.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -183,10 +186,10 @@
<appender name="naming-tag" <appender name="naming-tag"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-tag.log</file> <file>${LOG_HOME}/naming-tag.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-tag.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-tag.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -200,10 +203,10 @@
<appender name="naming-tenant" <appender name="naming-tenant"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-tenant.log</file> <file>${LOG_HOME}/naming-tenant.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-tenant.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-tenant.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -217,10 +220,10 @@
<appender name="naming-debug" <appender name="naming-debug"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/naming-debug.log</file> <file>${LOG_HOME}/naming-debug.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/naming-debug.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-debug.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -236,10 +239,10 @@
<!--config module logback config--> <!--config module logback config-->
<appender name="dumpFile" <appender name="dumpFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-dump.log</file> <file>${LOG_HOME}/config-dump.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -247,15 +250,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="pullFile" <appender name="pullFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-pull.log</file> <file>${LOG_HOME}/config-pull.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -263,15 +266,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="fatalFile" <appender name="fatalFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-fatal.log</file> <file>${LOG_HOME}/config-fatal.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -279,15 +282,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="memoryFile" <appender name="memoryFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-memory.log</file> <file>${LOG_HOME}/config-memory.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -295,15 +298,15 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="pullCheckFile" <appender name="pullCheckFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-pull-check.log</file> <file>${LOG_HOME}/config-pull-check.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -311,16 +314,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%msg%n</Pattern> <Pattern>%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="aclLog" <appender name="aclLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-acl.log</file> <file>${LOG_HOME}/config-acl.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -328,16 +331,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="clientLog" <appender name="clientLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-client-request.log</file> <file>${LOG_HOME}/config-client-request.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -345,16 +348,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="sdkLog" <appender name="sdkLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-sdk-request.log</file> <file>${LOG_HOME}/config-sdk-request.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -362,16 +365,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="traceLog" <appender name="traceLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-trace.log</file> <file>${LOG_HOME}/config-trace.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -379,16 +382,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date|%msg%n</Pattern> <Pattern>%date|%msg%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="notifyLog" <appender name="notifyLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-notify.log</file> <file>${LOG_HOME}/config-notify.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -396,16 +399,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="appCollectorLog" <appender name="appCollectorLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-app.log</file> <file>${LOG_HOME}/config-app.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-app.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-app.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -413,16 +416,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="startLog" <appender name="startLog"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/config-server.log</file> <file>${LOG_HOME}/config-server.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/config-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/config-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -430,16 +433,16 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<Pattern>%date %level %msg%n%n</Pattern> <Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset> <charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
<appender name="rootFile" <appender name="rootFile"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.home}/logs/nacos.log</file> <file>${LOG_HOME}/nacos.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${nacos.home}/logs/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>

View File

@ -12,188 +12,188 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>nacos-distribution</artifactId> <artifactId>nacos-distribution</artifactId>
<name>nacos-distribution ${project.version}</name> <name>nacos-distribution ${project.version}</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-console</artifactId> <artifactId>nacos-console</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<profiles> <profiles>
<profile> <profile>
<id>release-config</id> <id>release-config</id>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-config</artifactId> <artifactId>nacos-config</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>release-config</id> <id>release-config</id>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<phase>package</phase> <phase>package</phase>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>release-config.xml</descriptor> <descriptor>release-config.xml</descriptor>
</descriptors> </descriptors>
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<finalName>acm</finalName> <finalName>acm</finalName>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>release-naming</id> <id>release-naming</id>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-naming</artifactId> <artifactId>nacos-naming</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>release-naming</id> <id>release-naming</id>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<phase>package</phase> <phase>package</phase>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>release-naming.xml</descriptor> <descriptor>release-naming.xml</descriptor>
</descriptors> </descriptors>
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<finalName>ans</finalName> <finalName>ans</finalName>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>release-client</id> <id>release-client</id>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId> <artifactId>nacos-client</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>release-client</id> <id>release-client</id>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<phase>package</phase> <phase>package</phase>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>release-client.xml</descriptor> <descriptor>release-client.xml</descriptor>
</descriptors> </descriptors>
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<finalName>nacos-client</finalName> <finalName>nacos-client</finalName>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>release-core</id> <id>release-core</id>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-core</artifactId> <artifactId>nacos-core</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>release-core</id> <id>release-core</id>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<phase>package</phase> <phase>package</phase>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>release-core.xml</descriptor> <descriptor>release-core.xml</descriptor>
</descriptors> </descriptors>
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<finalName>nacos-core</finalName> <finalName>nacos-core</finalName>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>release-nacos</id> <id>release-nacos</id>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-console</artifactId> <artifactId>nacos-console</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version> <version>3.0.0</version>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>release-nacos.xml</descriptor> <descriptor>release-nacos.xml</descriptor>
</descriptors> </descriptors>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<id>make-assembly</id> <id>make-assembly</id>
<phase>install</phase> <phase>install</phase>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<finalName>nacos</finalName> <finalName>nacos</finalName>
</build> </build>
</profile> </profile>
</profiles> </profiles>
</project> </project>

View File

@ -14,62 +14,62 @@
limitations under the License. limitations under the License.
--> -->
<assembly> <assembly>
<id>client</id> <id>client</id>
<includeBaseDirectory>false</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<formats> <formats>
<format>dir</format> <format>dir</format>
<format>tar.gz</format> <format>tar.gz</format>
<format>zip</format> <format>zip</format>
</formats> </formats>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>../</directory> <directory>../</directory>
<includes> <includes>
<include>README.md</include> <include>README.md</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>conf/**</include> <include>conf/**</include>
<include>benchmark/*</include> <include>benchmark/*</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>bin/*</include> <include>bin/*</include>
</includes> </includes>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
<file> <file>
<source>LICENSE-BIN</source> <source>LICENSE-BIN</source>
<destName>LICENSE</destName> <destName>LICENSE</destName>
</file> </file>
<file> <file>
<source>NOTICE-BIN</source> <source>NOTICE-BIN</source>
<destName>NOTICE</destName> <destName>NOTICE</destName>
</file> </file>
</files> </files>
<moduleSets> <moduleSets>
<moduleSet> <moduleSet>
<useAllReactorProjects>true</useAllReactorProjects> <useAllReactorProjects>true</useAllReactorProjects>
<includes> <includes>
<include>com.alibaba.nacos:nacos-client</include> <include>com.alibaba.nacos:nacos-client</include>
</includes> </includes>
<binaries> <binaries>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
<unpack>false</unpack> <unpack>false</unpack>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
</dependencySet> </dependencySet>
</dependencySets> </dependencySets>
</binaries> </binaries>
</moduleSet> </moduleSet>
</moduleSets> </moduleSets>
</assembly> </assembly>

View File

@ -14,62 +14,62 @@
limitations under the License. limitations under the License.
--> -->
<assembly> <assembly>
<id>cfg</id> <id>cfg</id>
<includeBaseDirectory>false</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<formats> <formats>
<format>dir</format> <format>dir</format>
<format>tar.gz</format> <format>tar.gz</format>
<format>zip</format> <format>zip</format>
</formats> </formats>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>../</directory> <directory>../</directory>
<includes> <includes>
<include>README.md</include> <include>README.md</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>conf/**</include> <include>conf/**</include>
<include>benchmark/*</include> <include>benchmark/*</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>bin/*</include> <include>bin/*</include>
</includes> </includes>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
<file> <file>
<source>LICENSE-BIN</source> <source>LICENSE-BIN</source>
<destName>LICENSE</destName> <destName>LICENSE</destName>
</file> </file>
<file> <file>
<source>NOTICE-BIN</source> <source>NOTICE-BIN</source>
<destName>NOTICE</destName> <destName>NOTICE</destName>
</file> </file>
</files> </files>
<moduleSets> <moduleSets>
<moduleSet> <moduleSet>
<useAllReactorProjects>true</useAllReactorProjects> <useAllReactorProjects>true</useAllReactorProjects>
<includes> <includes>
<include>com.alibaba.nacos:nacos-config</include> <include>com.alibaba.nacos:nacos-config</include>
</includes> </includes>
<binaries> <binaries>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
<unpack>false</unpack> <unpack>false</unpack>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
</dependencySet> </dependencySet>
</dependencySets> </dependencySets>
</binaries> </binaries>
</moduleSet> </moduleSet>
</moduleSets> </moduleSets>
</assembly> </assembly>

View File

@ -14,61 +14,61 @@
limitations under the License. limitations under the License.
--> -->
<assembly> <assembly>
<id>core</id> <id>core</id>
<includeBaseDirectory>false</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<formats> <formats>
<format>dir</format> <format>dir</format>
<format>tar.gz</format> <format>tar.gz</format>
<format>zip</format> <format>zip</format>
</formats> </formats>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>../</directory> <directory>../</directory>
<includes> <includes>
<include>README.md</include> <include>README.md</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>conf/**</include> <include>conf/**</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>bin/*</include> <include>bin/*</include>
</includes> </includes>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
<file> <file>
<source>LICENSE-BIN</source> <source>LICENSE-BIN</source>
<destName>LICENSE</destName> <destName>LICENSE</destName>
</file> </file>
<file> <file>
<source>NOTICE-BIN</source> <source>NOTICE-BIN</source>
<destName>NOTICE</destName> <destName>NOTICE</destName>
</file> </file>
</files> </files>
<moduleSets> <moduleSets>
<moduleSet> <moduleSet>
<useAllReactorProjects>true</useAllReactorProjects> <useAllReactorProjects>true</useAllReactorProjects>
<includes> <includes>
<include>com.alibaba.nacos:nacos-core</include> <include>com.alibaba.nacos:nacos-core</include>
</includes> </includes>
<binaries> <binaries>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
<unpack>false</unpack> <unpack>false</unpack>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
</dependencySet> </dependencySet>
</dependencySets> </dependencySets>
</binaries> </binaries>
</moduleSet> </moduleSet>
</moduleSets> </moduleSets>
</assembly> </assembly>

View File

@ -14,50 +14,50 @@
limitations under the License. limitations under the License.
--> -->
<assembly> <assembly>
<id>server-${project.version}</id> <id>server-${project.version}</id>
<includeBaseDirectory>true</includeBaseDirectory> <includeBaseDirectory>true</includeBaseDirectory>
<formats> <formats>
<format>dir</format> <format>dir</format>
<format>tar.gz</format> <format>tar.gz</format>
<format>zip</format> <format>zip</format>
</formats> </formats>
<fileSets> <fileSets>
<fileSet> <fileSet>
<includes> <includes>
<include>conf/**</include> <include>conf/**</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>bin/*</include> <include>bin/*</include>
</includes> </includes>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
<file> <file>
<source>LICENSE-BIN</source> <source>LICENSE-BIN</source>
<destName>LICENSE</destName> <destName>LICENSE</destName>
</file> </file>
<file> <file>
<source>NOTICE-BIN</source> <source>NOTICE-BIN</source>
<destName>NOTICE</destName> <destName>NOTICE</destName>
</file> </file>
<file> <file>
<!--打好的jar包名称和放置目录--> <!--打好的jar包名称和放置目录-->
<source>../console/target/nacos-server.jar</source> <source>../console/target/nacos-server.jar</source>
<outputDirectory>/target/</outputDirectory> <outputDirectory>/target/</outputDirectory>
</file> </file>
</files> </files>
<moduleSets> <moduleSets>
<moduleSet> <moduleSet>
<useAllReactorProjects>true</useAllReactorProjects> <useAllReactorProjects>true</useAllReactorProjects>
<includes> <includes>
<include>com.alibaba.nacos:nacos-console</include> <include>com.alibaba.nacos:nacos-console</include>
</includes> </includes>
</moduleSet> </moduleSet>
</moduleSets> </moduleSets>
</assembly> </assembly>

View File

@ -14,62 +14,62 @@
limitations under the License. limitations under the License.
--> -->
<assembly> <assembly>
<id>naming</id> <id>naming</id>
<includeBaseDirectory>false</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<formats> <formats>
<format>dir</format> <format>dir</format>
<format>tar.gz</format> <format>tar.gz</format>
<format>zip</format> <format>zip</format>
</formats> </formats>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>../</directory> <directory>../</directory>
<includes> <includes>
<include>README.md</include> <include>README.md</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>conf/**</include> <include>conf/**</include>
<include>benchmark/*</include> <include>benchmark/*</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<includes> <includes>
<include>bin/*</include> <include>bin/*</include>
</includes> </includes>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
<file> <file>
<source>LICENSE-BIN</source> <source>LICENSE-BIN</source>
<destName>LICENSE</destName> <destName>LICENSE</destName>
</file> </file>
<file> <file>
<source>NOTICE-BIN</source> <source>NOTICE-BIN</source>
<destName>NOTICE</destName> <destName>NOTICE</destName>
</file> </file>
</files> </files>
<moduleSets> <moduleSets>
<moduleSet> <moduleSet>
<useAllReactorProjects>true</useAllReactorProjects> <useAllReactorProjects>true</useAllReactorProjects>
<includes> <includes>
<include>com.alibaba.nacos:nacos-naming</include> <include>com.alibaba.nacos:nacos-naming</include>
</includes> </includes>
<binaries> <binaries>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
<unpack>false</unpack> <unpack>false</unpack>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
<outputDirectory>lib/</outputDirectory> <outputDirectory>lib/</outputDirectory>
</dependencySet> </dependencySet>
</dependencySets> </dependencySets>
</binaries> </binaries>
</moduleSet> </moduleSet>
</moduleSets> </moduleSets>
</assembly> </assembly>

View File

@ -12,50 +12,50 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>nacos-example</artifactId> <artifactId>nacos-example</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>nacos-example ${project.version}</name> <name>nacos-example ${project.version}</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>nacos-common</artifactId> <artifactId>nacos-common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>nacos-core</artifactId> <artifactId>nacos-core</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId> <artifactId>nacos-client</artifactId>
</dependency> </dependency>
<!-- log --> <!-- log -->
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<included> <included>
<springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${user.home}/nacos/logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<appender name="naming-server" <appender name="naming-server"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-server.log</file> <file>${LOG_HOME}/naming-server.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -19,10 +22,10 @@
</appender> </appender>
<appender name="naming-raft" <appender name="naming-raft"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-raft.log</file> <file>${LOG_HOME}/naming-raft.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -35,10 +38,10 @@
</appender> </appender>
<appender name="naming-event" <appender name="naming-event"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-event.log</file> <file>${LOG_HOME}/naming-event.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-event.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-event.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -51,10 +54,10 @@
</appender> </appender>
<appender name="naming-push" <appender name="naming-push"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-push.log</file> <file>${LOG_HOME}/naming-push.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-push.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-push.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>
@ -67,10 +70,10 @@
</appender> </appender>
<appender name="naming-rt" <appender name="naming-rt"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-rt.log</file> <file>${LOG_HOME}/naming-rt.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-rt.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-rt.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -84,10 +87,10 @@
<appender name="naming-performance" <appender name="naming-performance"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-performance.log</file> <file>${LOG_HOME}/naming-performance.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-performance.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-performance.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap> <totalSizeCap>512MB</totalSizeCap>
@ -101,10 +104,10 @@
<appender name="naming-router" <appender name="naming-router"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-router.log</file> <file>${LOG_HOME}/naming-router.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-router.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-router.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -118,10 +121,10 @@
<appender name="naming-cache" <appender name="naming-cache"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-cache.log</file> <file>${LOG_HOME}/naming-cache.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-cache.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-cache.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -135,10 +138,10 @@
<appender name="naming-device" <appender name="naming-device"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-device.log</file> <file>${LOG_HOME}/naming-device.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-device.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-device.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize> <maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap> <totalSizeCap>7GB</totalSizeCap>
@ -152,10 +155,10 @@
<appender name="naming-tag" <appender name="naming-tag"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-tag.log</file> <file>${LOG_HOME}/naming-tag.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-tag.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-tag.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize> <maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap> <totalSizeCap>3GB</totalSizeCap>
@ -169,10 +172,10 @@
<appender name="naming-debug" <appender name="naming-debug"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/nacos/logs/naming-debug.log</file> <file>${LOG_HOME}/naming-debug.log</file>
<append>true</append> <append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/nacos/logs/naming-debug.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <fileNamePattern>${LOG_HOME}/naming-debug.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory> <MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap> <totalSizeCap>128MB</totalSizeCap>

View File

@ -21,7 +21,7 @@
<inceptionYear>2018</inceptionYear> <inceptionYear>2018</inceptionYear>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Alibaba NACOS ${project.version}</name> <name>Alibaba NACOS ${project.version}</name>
@ -226,6 +226,7 @@
<configuration> <configuration>
<excludes> <excludes>
<exclude>.editorconfig</exclude>
<exclude>.travis.yml</exclude> <exclude>.travis.yml</exclude>
<exclude>CONTRIBUTING.md</exclude> <exclude>CONTRIBUTING.md</exclude>
<exclude>CODE_OF_CONDUCT.md</exclude> <exclude>CODE_OF_CONDUCT.md</exclude>

View File

@ -17,7 +17,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.5.0</version> <version>0.6.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>