From c059f85f62dfb68950925ed42f6d3f39367a0e46 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Thu, 14 Dec 2023 15:31:41 +0800 Subject: [PATCH] Add type of system log --- .../kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt b/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt index 911b929..f324d7f 100644 --- a/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt +++ b/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt @@ -66,7 +66,11 @@ class SysLogInterceptor( sysLog.apply { logType = requestUri?.let { when { - it.startsWith("/system/statistics/") -> "STATISTICS" + it.startsWith("/login") -> "LOGIN" + it.startsWith("/logout") -> "LOGOUT" + it.startsWith("/register") -> "REGISTER" + it.startsWith("/system/statistic/") -> "STATISTIC" + it.startsWith("/api/") -> "API" else -> "INFO" } } ?: "INFO"