diff --git a/pigx-register/src/main/java/com/alibaba/nacos/bootstrap/PigxNacosApplication.java b/pigx-register/src/main/java/com/alibaba/nacos/bootstrap/PigxNacosApplication.java index c7a7e3ebe..0c0c36412 100644 --- a/pigx-register/src/main/java/com/alibaba/nacos/bootstrap/PigxNacosApplication.java +++ b/pigx-register/src/main/java/com/alibaba/nacos/bootstrap/PigxNacosApplication.java @@ -12,6 +12,9 @@ import org.springframework.boot.WebApplicationType; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.context.ConfigurableApplicationContext; +import static org.springframework.boot.context.logging.LoggingApplicationListener.CONFIG_PROPERTY; +import static org.springframework.core.io.ResourceLoader.CLASSPATH_URL_PREFIX; + /** * @author nacos *
@@ -26,6 +29,7 @@ public class PigxNacosApplication {
public static void main(String[] args) {
System.setProperty(STANDALONE_MODE, "true");
+ System.setProperty(CONFIG_PROPERTY, CLASSPATH_URL_PREFIX + "logback-spring.xml");
String type = System.getProperty(Constants.NACOS_DEPLOYMENT_TYPE, Constants.NACOS_DEPLOYMENT_TYPE_MERGED);
DeploymentType deploymentType = DeploymentType.getType(type);
diff --git a/pigx-register/src/main/resources/logback-spring.xml b/pigx-register/src/main/resources/logback-spring.xml
new file mode 100644
index 000000000..a1931d8b7
--- /dev/null
+++ b/pigx-register/src/main/resources/logback-spring.xml
@@ -0,0 +1,94 @@
+
+
+
+
+