mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:53:44 +08:00
fix: parse logger time
This commit is contained in:
parent
cb48545600
commit
b199209d0d
@ -1,3 +1,4 @@
|
|||||||
|
import dayjs from "dayjs";
|
||||||
import { invoke } from "@tauri-apps/api/tauri";
|
import { invoke } from "@tauri-apps/api/tauri";
|
||||||
import { Notice } from "@/components/base";
|
import { Notice } from "@/components/base";
|
||||||
|
|
||||||
@ -10,7 +11,8 @@ export async function getClashLogs() {
|
|||||||
.map((log) => {
|
.map((log) => {
|
||||||
const result = log.match(regex);
|
const result = log.match(regex);
|
||||||
if (result) {
|
if (result) {
|
||||||
const [_, time, type, payload] = result;
|
const [_, _time, type, payload] = result;
|
||||||
|
const time = dayjs(_time).format("MM-DD HH:mm:ss");
|
||||||
return { time, type, payload };
|
return { time, type, payload };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user