<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<!-- 使用 Spring Boot 的默认配置 -->
	<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
	<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
	<include resource="org/springframework/boot/logging/logback/file-appender.xml"/>

	<!-- 开发环境：只输出到控制台 -->
	<springProfile name="dev">
		<root level="INFO">
			<appender-ref ref="CONSOLE"/>
		</root>
	</springProfile>

	<!-- 生产环境：输出到控制台和文件 -->
	<springProfile name="prod">
		<root level="INFO">
			<appender-ref ref="CONSOLE"/>
			<appender-ref ref="FILE"/>
		</root>
	</springProfile>
</configuration>