Log
The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. 대부분처럼 loggers 에는 다양한 로그 수준이 있습니다:
- Trace
- Debug
- Info
- Warning
- Error
- Fatal
Logger는 현재 이상의 로그 수준에서 모든 로그 메시지를 출력합니다. Example: Debug 로그 level은 Trace 메시지를 제외한 모든 메시지를 출력합니다.
LogPrint
주어진 메시지를 원본 메시지로 기록합니다.
Go: LogPrint(ctx context.Context, message string)
JS: LogPrint(message: string)
LogPrintf
주어진 메시지를 원본 메시지로 기록합니다.
Go: LogPrintf(ctx context.Context, format string, args ...interface{})
LogTrace
Trace 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogTrace(ctx context.Context, message string)
JS: LogTrace(message: string)
LogTracef
Trace 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogTracef(ctx context.Context, format string, args ...interface{})
LogDebug
Debug 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogDebug(ctx context.Context, message string)
JS: LogDebug(message: string)
LogDebugf
Debug 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogDebugf(ctx context.Context, format string, args ...interface{})