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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user