MCPcopy Index your code
hub / github.com/coder/coder / Logger

Function Logger

tailnet/conn.go:1012–1020  ·  view source on GitHub ↗

Logger converts the Tailscale logging function to use a slog-compatible logger.

(logger interface {
	Debug(ctx context.Context, str string, fields ...slog.Field)
},
)

Source from the content-addressed store, hash-verified

1010// Logger converts the Tailscale logging function to use a slog-compatible
1011// logger.
1012func Logger(logger interface {
1013 Debug(ctx context.Context, str string, fields ...slog.Field)
1014},
1015) tslogger.Logf {
1016 return tslogger.Logf(func(format string, args ...any) {
1017 slog.Helper()
1018 logger.Debug(context.Background(), fmt.Sprintf(format, args...))
1019 })
1020}

Callers 15

NewFunction · 0.92
NewOptionsFunction · 0.92
GetNetworkingStackFunction · 0.92
GetNetworkingStackFunction · 0.92
newDerpServerFunction · 0.92
RunDERPAndSTUNFunction · 0.92
RunDERPOnlyWebSocketsFunction · 0.92
NewFunction · 0.92
TestDERPMeshFunction · 0.92
startDERPFunction · 0.92
addAddressMethod · 0.92
ServerMethod · 0.92

Calls 2

LogfMethod · 0.65
HelperMethod · 0.65

Tested by 2

TestDERPMeshFunction · 0.74
startDERPFunction · 0.74