axzo-framework/axzo-logger-spring-boot-starter/README.md
zhourui 周锐 47bb243bd7 完善readme
2022-09-12 11:45:00 +08:00

42 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# axzo-logger-spring-boot-starter
日志支持库.
更多细节用法请参考:
- [Spring Boot Logging](https://docs.spring.io/spring-boot/docs/2.4.13/reference/html/spring-boot-features.html#boot-features-logging)
## Quickstart
### 1、引入依赖
``` xml
<!-- Logger依赖 -->
<dependency>
<groupId>cn.axzo.framework</groupId>
<artifactId>axzo-logger-spring-boot-starter</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
```
### 2、配置说明
基础配置文件路径在logger项目的资源目录以included的方式配置了基础PATTERN、Appender、和默认springProfile配置项目中可在logback-spring.xml中对上述配置进行覆盖。
</br>
查看基础配置信息:[axzo-logger-spring-boot-starter/src/main/resources/logback/logback-axzo.xml](https://axzsource.com/infra/axzo-framework/-/blob/planz/axzo-logger-spring-boot-starter/src/main/resources/logback/logback-axzo.xml)
### 3、配置示例logback-spring.xml
项目配置示例:
``` xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<configuration>
<!-- 导入安心筑全局日志配置 -->
<include resource="logback/logback-axzo.xml" />
<!-- 覆盖开发环境日志配置 -->
<springProfile name="local,dev">
<logger name="cn.axzo" level="DEBUG" />
</springProfile>
</configuration>
```