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
ExportLogs() (string, error)TypeScript
ExportLogs(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
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
ListLogs(limit int) ([]string, error)TypeScript
ListLogs(limit: number): Promise<string[]>Parameters
| Name | Type |
|---|---|
limit | int |
Returns
| Go type | TypeScript type |
|---|---|
[]string | string[] |
Example
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
OpenLogsDirectory() errorTypeScript
OpenLogsDirectory(): Promise<void>Example
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
WriteLog(level string, message string, attrs map[string]string) errorTypeScript
WriteLog(level: string, message: string, attrs: Record<string, string>): Promise<void>Parameters
| Name | Type |
|---|---|
level | string |
message | string |
attrs | map[string]string |
Example
await WriteLog("", "", {})Source
internal/transport/wails/log_controller.go:69