Explorar el Código

logback 日志文件默认值

xucaiqin hace 2 años
padre
commit
5ef6530ae3

+ 2 - 1
iot-gateway/src/main/resources/logback-spring.xml

@@ -7,10 +7,11 @@
     <!--关闭logback自身的debug日志打印-->
     <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
     <contextName>logback</contextName>
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
 
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
     <property name="log.path" value="logs"/>
-    <springProperty scope="context" name="LOG_HOME" source="spring.application.name"/>
+    <springProperty scope="context" name="LOG_HOME" source="spring.application.name" defaultValue="iot-gateway"/>
     <!--0. 日志格式和颜色渲染 -->
     <!-- 彩色日志依赖的渲染类 -->
     <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

+ 2 - 1
iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/logback-spring.xml

@@ -7,10 +7,11 @@
     <!--关闭logback自身的debug日志打印-->
     <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
     <contextName>logback</contextName>
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
 
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
     <property name="log.path" value="logs"/>
-    <springProperty scope="context" name="LOG_HOME" source="spring.application.name"/>
+    <springProperty scope="context" name="LOG_HOME" source="spring.application.name" defaultValue="iot-auth"/>
     <!--0. 日志格式和颜色渲染 -->
     <!-- 彩色日志依赖的渲染类 -->
     <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

+ 2 - 1
iot-module/iot-module-data/iot-module-data-biz/src/main/resources/logback-spring.xml

@@ -7,10 +7,11 @@
     <!--关闭logback自身的debug日志打印-->
     <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
     <contextName>logback</contextName>
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
 
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
     <property name="log.path" value="logs"/>
-    <springProperty scope="context" name="LOG_HOME" source="spring.application.name"/>
+    <springProperty scope="context" name="LOG_HOME" source="spring.application.name" defaultValue="iot-data"/>
     <!--0. 日志格式和颜色渲染 -->
     <!-- 彩色日志依赖的渲染类 -->
     <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

+ 2 - 1
iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/logback-spring.xml

@@ -7,10 +7,11 @@
     <!--关闭logback自身的debug日志打印-->
     <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
     <contextName>logback</contextName>
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
 
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
     <property name="log.path" value="logs"/>
-    <springProperty scope="context" name="LOG_HOME" source="spring.application.name"/>
+    <springProperty scope="context" name="LOG_HOME" source="spring.application.name" defaultValue="iot-manage"/>
     <!--0. 日志格式和颜色渲染 -->
     <!-- 彩色日志依赖的渲染类 -->
     <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

+ 1 - 1
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/logback-spring.xml

@@ -10,7 +10,7 @@
     <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
     <property name="log.path" value="logs"/>
-    <springProperty scope="context" name="LOG_HOME" source="spring.application.name"/>
+    <springProperty scope="context" name="LOG_HOME" source="spring.application.name" defaultValue="iot-system"/>
     <!--0. 日志格式和颜色渲染 -->
     <!-- 彩色日志依赖的渲染类 -->
     <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>