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{})
LogInfo
Info 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogInfo(ctx context.Context, message string)
JS: LogInfo(message: string)
LogInfof
Info 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogInfof(ctx context.Context, format string, args ...interface{})
LogWarning
Warning 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogWarning(ctx context.Context, message string)
JS: LogWarning(message: string)
LogWarningf
Warning 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogWarningf(ctx context.Context, format string, args ...interface{})
LogError
Error 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogError(ctx context.Context, message string)
JS: LogError(message: string)
LogErrorf
Error 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogErrorf(ctx context.Context, format string, args ...interface{})
LogFatal
Fatal 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogFatal(ctx context.Context, message string)
JS: LogFatal(message: string)
LogFatalf
Fatal 로그 수준에서 지정된 메시지를 기록합니다.
Go: LogFatalf(ctx context.Context, format string, args ...interface{})