Skip to content

LogController

LogController exposes the launcher's in-memory log console and lets the user export the recent logs plus a system summary for support.

  • Methods: 4
  • Referenced types: 0

Methods

ExportLogs

ExportLogs asks the user for a destination and writes a support log file containing a system summary and the recent launcher log. It returns the saved path, or an empty string when the user cancels the dialog. Sensitive values never reach the file: the log buffer is redacted on write and the summary carries no credentials or machine-specific paths.

Go

go
ExportLogs() (string, error)

TypeScript

ts
ExportLogs(): Promise<string>

Returns

Go typeTypeScript type
stringstring

Example

ts
const exportLogs = await ExportLogs()

Source

internal/transport/wails/log_controller.go:135

ListLogs

ListLogs returns the most recent log lines rendered for the console. The newest lines come last. Lines are ANSI-colored so an xterm-style viewer can display them directly.

Go

go
ListLogs(limit int) ([]string, error)

TypeScript

ts
ListLogs(limit: number): Promise<string[]>

Parameters

NameType
limitint

Returns

Go typeTypeScript type
[]stringstring[]

Example

ts
const listLogs = await ListLogs(0)

Source

internal/transport/wails/log_controller.go:55

OpenLogsDirectory

OpenLogsDirectory opens the launcher's rolling log directory in the native file manager, creating it when needed.

Go

go
OpenLogsDirectory() error

TypeScript

ts
OpenLogsDirectory(): Promise<void>

Example

ts
await OpenLogsDirectory()

Source

internal/transport/wails/log_controller.go:116

WriteLog

WriteLog routes a log entry reported from the frontend into the launcher's logging pipeline (in-memory console, live push, session file, support export). The level must be one of "debug", "info", "warn" or "error"; messages are length-capped and sensitive values are redacted like any other log line. Attrs are attached as key/value pairs; the entry is marked with source=frontend so UI-originated lines are distinguishable.

Go

go
WriteLog(level string, message string, attrs map[string]string) error

TypeScript

ts
WriteLog(level: string, message: string, attrs: Record<string, string>): Promise<void>

Parameters

NameType
levelstring
messagestring
attrsmap[string]string

Example

ts
await WriteLog("", "", {})

Source

internal/transport/wails/log_controller.go:69