commit
ab23965474
@ -200,23 +200,6 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="rootFile"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}/nacos/logs/nacos.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${user.home}/nacos/logs/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<totalSizeCap>512MB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<Pattern>%date %level %msg%n%n</Pattern>
|
||||
<charset>GBK</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="com.alibaba.nacos.config.dumpLog" additivity="false">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="dumpFile"/>
|
||||
@ -273,10 +256,5 @@
|
||||
<appender-ref ref="startLog"/>
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="rootFile"/>
|
||||
</root>
|
||||
|
||||
</included>
|
||||
|
||||
|
@ -12,6 +12,23 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="rootFile"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}/nacos/logs/nacos.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${user.home}/nacos/logs/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<totalSizeCap>512MB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<Pattern>%date %level %msg%n%n</Pattern>
|
||||
<charset>GBK</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<springProfile name="!standalone">
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
|
@ -64,7 +64,6 @@ public class NacosDefaultPropertySourceEnvironmentPostProcessorTest {
|
||||
public void testDefaultProperties() {
|
||||
|
||||
// Web Server
|
||||
assertPropertyEquals("server.servlet.context-path", "/nacos");
|
||||
assertPropertyEquals("server.port", "8848");
|
||||
assertPropertyEquals("server.tomcat.uri-encoding", "UTF-8");
|
||||
|
||||
@ -80,7 +79,6 @@ public class NacosDefaultPropertySourceEnvironmentPostProcessorTest {
|
||||
public void testDefaultPropertyNames() {
|
||||
|
||||
assertPropertyNames(
|
||||
"server.servlet.context-path",
|
||||
"server.port",
|
||||
"server.tomcat.uri-encoding",
|
||||
"spring.http.encoding.force",
|
||||
|
@ -184,23 +184,6 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="rootFile"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}/nacos/logs/nacos.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${user.home}/nacos/logs/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<MaxHistory>15</MaxHistory>
|
||||
<totalSizeCap>512MB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<Pattern>%date %level %msg%n%n</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="com.alibaba.nacos.naming.main" additivity="false">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="naming-server"/>
|
||||
@ -238,10 +221,5 @@
|
||||
<appender-ref ref="naming-debug"/>
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="rootFile"/>
|
||||
</root>
|
||||
|
||||
</included>
|
||||
|
||||
|
@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author dungu.zpf
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = NamingApp.class, properties = {"server.servlet.context-path=/nacos"},
|
||||
@SpringBootTest(classes = NamingApp.class,
|
||||
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class ServiceListTest {
|
||||
|
||||
@ -45,10 +45,10 @@ public class ServiceListTest {
|
||||
private int port;
|
||||
|
||||
@Before
|
||||
public void init() throws Exception{
|
||||
public void init() throws Exception {
|
||||
if (naming == null) {
|
||||
TimeUnit.SECONDS.sleep(10);
|
||||
naming = NamingFactory.createNamingService("127.0.0.1"+":"+port);
|
||||
naming = NamingFactory.createNamingService("127.0.0.1" + ":" + port);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
# spring
|
||||
|
||||
server.servlet.context-path=/nacos
|
||||
server.port=8848
|
||||
|
||||
nacos.standalone=true
|
Loading…
Reference in New Issue
Block a user