MCPcopy
hub / github.com/wailsapp/wails / getLogger

Function getLogger

v2/pkg/runtime/runtime.go:31–45  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

29}
30
31func getLogger(ctx context.Context) *logger.Logger {
32 if ctx == nil {
33 pc, _, _, _ := goruntime.Caller(1)
34 funcName := goruntime.FuncForPC(pc).Name()
35 log.Fatalf("cannot call '%s': %s", funcName, contextError)
36 }
37 result := ctx.Value("logger")
38 if result != nil {
39 return result.(*logger.Logger)
40 }
41 pc, _, _, _ := goruntime.Caller(1)
42 funcName := goruntime.FuncForPC(pc).Name()
43 log.Fatalf("cannot call '%s': %s", funcName, contextError)
44 return nil
45}
46
47func getEvents(ctx context.Context) frontend.Events {
48 if ctx == nil {

Callers 15

LogPrintFunction · 0.85
LogTraceFunction · 0.85
LogDebugFunction · 0.85
LogInfoFunction · 0.85
LogWarningFunction · 0.85
LogErrorFunction · 0.85
LogFatalFunction · 0.85
LogPrintfFunction · 0.85
LogTracefFunction · 0.85
LogDebugfFunction · 0.85
LogInfofFunction · 0.85
LogWarningfFunction · 0.85

Calls 2

NameMethod · 0.65
ValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…