Revert "feat: enhance log filtering by adding support for debug level and updating log hierarchy #4293"

This reverts commit a9cfb2cfaa.
This commit is contained in:
Tunglies
2025-08-08 15:15:49 +08:00
parent 6a93ff1fc1
commit 319c5b84fa
5 changed files with 14 additions and 39 deletions

View File

@@ -185,7 +185,10 @@ export const clearGlobalLogs = () => {
export const useGlobalLogData = (logLevel: LogLevel = "all") => {
const logs = useGlobalLogStore((state) => state.logs);
// 日志已经在后端根据级别进行了过滤,这里直接返回所有日志
// 不需要在前端再次过滤避免重复过滤导致DEBUG日志丢失
return logs;
// 根据当前选择的日志等级过滤日志
if (logLevel === "all") {
return logs;
} else {
return logs.filter((log) => log.type.toLowerCase() === logLevel);
}
};