mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-07 22:57:20 +08:00
refactor: 💥 适配 ContiNew Starter Log(日志模块)
1.continew-starter 1.0.1-SNAPSHOT => 1.1.0-SNAPSHOT 2.日志表结构及相关管理 UI 变更
This commit is contained in:
@@ -25,19 +25,21 @@ project:
|
||||
--- ### 日志配置(重叠部分,优先级高于 logback-spring.xml 中的配置)
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
## 系统日志配置
|
||||
system:
|
||||
# 是否启用系统日志
|
||||
## 日志配置
|
||||
continew-starter:
|
||||
log:
|
||||
enabled: true
|
||||
# 是否记录内网 IP 操作
|
||||
includeInnerIp: true
|
||||
# 排除请求方式
|
||||
#excludeMethods:
|
||||
# - GET
|
||||
# 脱敏字段
|
||||
desensitizeFields:
|
||||
- password
|
||||
- Authorization
|
||||
include:
|
||||
- DESCRIPTION
|
||||
- MODULE
|
||||
- REQUEST_HEADERS
|
||||
- REQUEST_BODY
|
||||
- IP_ADDRESS
|
||||
- BROWSER
|
||||
- OS
|
||||
- RESPONSE_HEADERS
|
||||
- RESPONSE_BODY
|
||||
- TIME_TAKEN
|
||||
|
||||
--- ### 接口文档配置
|
||||
springdoc:
|
||||
|
||||
@@ -123,17 +123,17 @@ CREATE TABLE IF NOT EXISTS `sys_log` (
|
||||
`status_code` int NOT NULL COMMENT '状态码',
|
||||
`response_headers` text DEFAULT NULL COMMENT '响应头',
|
||||
`response_body` mediumtext DEFAULT NULL COMMENT '响应体',
|
||||
`elapsed_time` bigint(20) NOT NULL COMMENT '请求耗时(ms)',
|
||||
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '操作状态(1:成功;2:失败)',
|
||||
`client_ip` varchar(100) DEFAULT NULL COMMENT '客户端IP',
|
||||
`location` varchar(255) DEFAULT NULL COMMENT 'IP归属地',
|
||||
`time_taken` bigint(20) NOT NULL COMMENT '耗时(ms)',
|
||||
`ip` varchar(100) DEFAULT NULL COMMENT 'IP',
|
||||
`address` varchar(255) DEFAULT NULL COMMENT 'IP归属地',
|
||||
`browser` varchar(100) DEFAULT NULL COMMENT '浏览器',
|
||||
`os` varchar(100) DEFAULT NULL COMMENT '操作系统',
|
||||
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:成功;2:失败)',
|
||||
`error_msg` text DEFAULT NULL COMMENT '错误信息',
|
||||
`exception_detail` mediumtext DEFAULT NULL COMMENT '异常详情',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_module`(`module`) USING BTREE,
|
||||
INDEX `idx_client_ip`(`client_ip`) USING BTREE,
|
||||
INDEX `idx_ip`(`ip`) USING BTREE,
|
||||
INDEX `idx_create_time`(`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统日志表';
|
||||
|
||||
Reference in New Issue
Block a user