调整日志输出方式,更新数据库日志存储结构;首页查询统计数据接口实现

This commit is contained in:
2025-06-20 15:17:15 +08:00
parent 63fbcbd6dd
commit 546e81fee3
17 changed files with 1423 additions and 42 deletions

View File

@@ -150,17 +150,15 @@ func newLogger() fiber.Handler {
var errStr = strings.TrimSpace(logVars[5])
var item = &m.LogsRequest{
IP: ip,
Ua: u.P(ua),
Method: method,
Path: path,
Latency: &latency,
Status: int32(status),
Error: &errStr,
Time: u.P(orm.LocalDateTime(reqTime)),
}
if authType != auth.PayloadNone {
item.Identity = u.P(int32(authType))
Identity: int32(authType),
IP: ip,
Ua: u.P(ua),
Method: method,
Path: path,
Latency: latency,
Status: int32(status),
Error: &errStr,
Time: orm.LocalDateTime(reqTime),
}
if authID != 0 {
item.Visitor = u.P(int32(authID))