# PFYMonitorUtil
**Repository Path**: Null_Point_Exception/PFYMonitorUtil
## Basic Information
- **Project Name**: PFYMonitorUtil
- **Description**: 这是一个基于spring boot的项目Exception和日志监控的工具类
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-05-02
- **Last Updated**: 2021-12-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: 我的工程
## README
## 简介
这是一个基于spring boot的项目Exception和日志监控的工具类
spring也可使用,配置参考注解配置文件
### 项目
本工具类基于[PFYCommonTools](https://gitee.com/Null_Point_Exception/PFYCommonTools)
PFYMonitorUtil-Example 示例
PFYMonitorUtil-Common 公共包
PFYMonitorUtil-Request-All 基于web请求的分析记录
PFYMonitorUtil-Request-Exception 基于web请求的错误分析记录
PFYMonitorUtil-Log 基于log记录的存储
PFYMonitorUtil-Async-Storage 基于rabbitmq转发的记录工程示例
PFYMonitorUtil-Analysis 分析工程(待完善)
详细使用键目录里的README.md
使用工具类请先本地mvn install
### 日志记录方式及spring boot配置说明
记录方式支持多个方式同时使用(不推荐),添加相应的注解即可,推荐使用方式: mongodb > mysql > file > mail
配置文件详见PFYMonitorUtil-Example
新增基于rabbitmq转发的记录模式
#### 公共配置
maven依赖
```text
com.panfeiyun.notes.example.tool.monitor
PFYMonitorUtil-Request
1.0-SNAPSHOT
```
添加@MEnableRewriteRequest注解替换request
#### mongodb记录
添加@MEnableMongodbStorage注解开启
maven依赖
```text
org.springframework.boot
spring-boot-starter-data-mongodb
```
#### mysql记录
添加@MEnableMysqlJpaStorage注解开启
maven依赖
```text
org.springframework.boot
spring-boot-starter-data-jpa
provided
com.alibaba
druid-spring-boot-starter
provided
mysql
mysql-connector-java
provided
```
#### 文件记录
添加@MEnableFileStorage注解开启
#### 邮件记录
添加@MEnableMailStorage注解开启
maven
```text
org.springframework.boot
spring-boot-starter-mail
provided
```
#### rabbitmq转发记录
添加@MEnableRabbitMqStorage注解开启转发
添加@MEnableRabbitMqReceive注解开启接收
记录详见PFYMonitorUtil-Async-Storage工程
maven
```text
org.springframework.boot
spring-boot-starter-amqp
provided
```