From 6b83d7ef0507c397a474f6dd1060a7e6ab104b3e Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Sat, 9 Dec 2023 23:20:38 +0800 Subject: [PATCH] Add statistics type to system log --- .../kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt | 7 ++++++- 1 file changed, 6 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 1664ae3..911b929 100644 --- a/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt +++ b/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt @@ -64,7 +64,12 @@ class SysLogInterceptor( if (result is ResponseResult<*>) { if (result.success) { sysLog.apply { - logType = "INFO" + logType = requestUri?.let { + when { + it.startsWith("/system/statistics/") -> "STATISTICS" + else -> "INFO" + } + } ?: "INFO" exception = 0 } } else {