mirror of
https://github.com/lanyeeee/bilibili-video-downloader.git
synced 2026-09-08 17:16:52 +08:00
feat: 后端支持输出日志
This commit is contained in:
+9
-1
@@ -16,6 +16,11 @@ async getConfig() : Promise<Config> {
|
||||
/** user-defined events **/
|
||||
|
||||
|
||||
export const events = __makeEvents__<{
|
||||
logEvent: LogEvent
|
||||
}>({
|
||||
logEvent: "log-event"
|
||||
})
|
||||
|
||||
/** user-defined constants **/
|
||||
|
||||
@@ -23,7 +28,10 @@ async getConfig() : Promise<Config> {
|
||||
|
||||
/** user-defined types **/
|
||||
|
||||
export type Config = { downloadDir: string }
|
||||
export type Config = { downloadDir: string; enableFileLogger: boolean }
|
||||
export type JsonValue = null | boolean | number | string | JsonValue[] | { [key in string]: JsonValue }
|
||||
export type LogEvent = { timestamp: string; level: LogLevel; fields: { [key in string]: JsonValue }; target: string; filename: string; line_number: number }
|
||||
export type LogLevel = "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR"
|
||||
|
||||
/** tauri-specta globals **/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user