Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/go-logr/logr
/ functions
Functions
353 in github.com/go-logr/logr
⨍
Functions
353
◇
Types & classes
83
↓ 1 callers
Method
WithName
WithName returns a new Logger instance with the specified name element added to the Logger's name. Successive calls with WithName append additional s
logr.go:341
↓ 1 callers
Method
WithSink
WithSink returns a copy of the logger with the new sink.
logr.go:235
↓ 1 callers
Function
containsOne
(hay string, needles ...string)
internal/testhelp/slog.go:71
↓ 1 callers
Function
doSlog
(log logr.Logger)
funcr/example/main_slog.go:28
↓ 1 callers
Function
expectEqual
(t *testing.T, expected, actual any)
slogr_test.go:193
↓ 1 callers
Function
getCaller
(depth int)
logr_test.go:405
↓ 1 callers
Function
helper2
(log logr.Logger, msg string)
testr/testr_test.go:85
↓ 1 callers
Function
helper2
(log logr.Logger, msg string)
funcr/example/main.go:39
↓ 1 callers
Function
helper2
(log logr.Logger, msg string)
testing/test_test.go:48
↓ 1 callers
Function
invokeError
(e error)
funcr/funcr.go:749
↓ 1 callers
Function
invokeMarshaler
(m logr.Marshaler)
funcr/funcr.go:731
↓ 1 callers
Function
invokeStringer
(s fmt.Stringer)
funcr/funcr.go:740
↓ 1 callers
Function
isEmpty
(v reflect.Value)
funcr/funcr.go:711
↓ 1 callers
Function
kvListToAttrs
(kvList ...interface{})
slogsink.go:109
↓ 1 callers
Method
levelFromSlog
levelFromSlog adjusts the level by the logger's verbosity and negates it. It ensures that the result is >= 0. This is necessary because the result is
funcr/slogsink.go:109
↓ 1 callers
Function
line
line returns the line number of the caller, if possible. This is useful in tests with a large number of cases - when something goes wrong you can fin
funcr/funcr_test.go:280
↓ 1 callers
Function
logError
Error logging implementation shared between testLogger and testLoggerInterface.
testr/testr.go:105
↓ 1 callers
Function
logInfo
Info logging implementation shared between testLogger and testLoggerInterface.
testr/testr.go:95
↓ 1 callers
Function
logrExample
(log logr.Logger)
funcr/example/main.go:58
↓ 1 callers
Function
logrExample
(log logr.Logger)
examples/slog/main.go:77
↓ 1 callers
Function
logrHelper
(log logr.Logger, msg string)
examples/slog/main.go:40
↓ 1 callers
Function
logrHelper2
(log logr.Logger, msg string)
examples/slog/main.go:44
↓ 1 callers
Function
needsEscape
needsEscape determines whether the input string needs to be escaped or not, without doing any allocations.
funcr/funcr.go:702
↓ 1 callers
Method
prettyWithFlags
TODO: This is not fast. Most of the overhead goes here. value: The value to render flags: Bitmask of flags (see above) depth: The current depth of nes
funcr/funcr.go:443
↓ 1 callers
Function
ptrint
(i int)
funcr/funcr_test.go:33
↓ 1 callers
Method
renderGroup
renderGroup returns a string representation of the named group with rendered values and args. If the name is empty, this will return the values and a
funcr/funcr.go:330
↓ 1 callers
Method
sinkWithCallDepth
sinkWithCallDepth adjusts the stack unwinding so that when Error or Info are called by Handle, code in slog gets skipped. This offset currently (Go 1
sloghandler.go:95
↓ 1 callers
Function
slogExample
(log *slog.Logger)
funcr/example/main_slog.go:33
↓ 1 callers
Function
slogExample
(log *slog.Logger)
examples/slog/main.go:90
↓ 1 callers
Function
slogHelper
(log *slog.Logger, msg string)
examples/slog/main.go:48
↓ 1 callers
Function
slogHelper2
(log *slog.Logger, msg string)
examples/slog/main.go:52
↓ 1 callers
Method
snippet
snippet produces a short snippet string of an arbitrary value.
funcr/funcr.go:797
↓ 1 callers
Method
startGroup
startGroup opens a new group scope (basically a sub-struct), which locks all the current saved values and starts them anew. This is needed to satisfy
funcr/funcr.go:826
Function
BenchmarkDiscardLogError
(b *testing.B)
benchmark/benchmark_test.go:195
Function
BenchmarkDiscardLogInfoOneArg
discard
benchmark/benchmark_test.go:165
Function
BenchmarkDiscardLogInfoPointerArgs
(b *testing.B)
benchmark/benchmark_test.go:175
Function
BenchmarkDiscardLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_test.go:170
Function
BenchmarkDiscardLogInfoWithValues
(b *testing.B)
benchmark/benchmark_test.go:180
Function
BenchmarkDiscardLogV0Info
(b *testing.B)
benchmark/benchmark_test.go:185
Function
BenchmarkDiscardLogV9Info
(b *testing.B)
benchmark/benchmark_test.go:190
Function
BenchmarkDiscardWithName
(b *testing.B)
benchmark/benchmark_test.go:205
Function
BenchmarkDiscardWithValues
(b *testing.B)
benchmark/benchmark_test.go:200
Function
BenchmarkFuncrJSONLogError
(b *testing.B)
benchmark/benchmark_test.go:277
Function
BenchmarkFuncrJSONLogInfoErrorValue
(b *testing.B)
benchmark/benchmark_test.go:302
Function
BenchmarkFuncrJSONLogInfoMarshalerValue
(b *testing.B)
benchmark/benchmark_test.go:307
Function
BenchmarkFuncrJSONLogInfoOneArg
(b *testing.B)
benchmark/benchmark_test.go:222
Function
BenchmarkFuncrJSONLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_test.go:237
Function
BenchmarkFuncrJSONLogInfoStringerValue
(b *testing.B)
benchmark/benchmark_test.go:297
Function
BenchmarkFuncrJSONLogInfoWithValues
(b *testing.B)
benchmark/benchmark_test.go:247
Function
BenchmarkFuncrJSONLogV0Info
(b *testing.B)
benchmark/benchmark_test.go:257
Function
BenchmarkFuncrJSONLogV9Info
(b *testing.B)
benchmark/benchmark_test.go:267
Function
BenchmarkFuncrLogError
(b *testing.B)
benchmark/benchmark_test.go:272
Function
BenchmarkFuncrLogInfoOneArg
(b *testing.B)
benchmark/benchmark_test.go:217
Function
BenchmarkFuncrLogInfoPointerArgs
(b *testing.B)
benchmark/benchmark_test.go:232
Function
BenchmarkFuncrLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_test.go:227
Function
BenchmarkFuncrLogInfoWithValues
(b *testing.B)
benchmark/benchmark_test.go:242
Function
BenchmarkFuncrLogV0Info
(b *testing.B)
benchmark/benchmark_test.go:252
Function
BenchmarkFuncrLogV9Info
(b *testing.B)
benchmark/benchmark_test.go:262
Function
BenchmarkFuncrWithCallDepth
(b *testing.B)
benchmark/benchmark_test.go:292
Function
BenchmarkFuncrWithName
(b *testing.B)
benchmark/benchmark_test.go:287
Function
BenchmarkFuncrWithValues
(b *testing.B)
benchmark/benchmark_test.go:282
Function
BenchmarkSlogJSONLogError
(b *testing.B)
benchmark/benchmark_slog_test.go:108
Function
BenchmarkSlogJSONLogInfoErrorValue
(b *testing.B)
benchmark/benchmark_slog_test.go:133
Function
BenchmarkSlogJSONLogInfoMarshalerValue
(b *testing.B)
benchmark/benchmark_slog_test.go:138
Function
BenchmarkSlogJSONLogInfoOneArg
(b *testing.B)
benchmark/benchmark_slog_test.go:83
Function
BenchmarkSlogJSONLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_slog_test.go:88
Function
BenchmarkSlogJSONLogInfoStringerValue
(b *testing.B)
benchmark/benchmark_slog_test.go:128
Function
BenchmarkSlogJSONLogInfoWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:93
Function
BenchmarkSlogJSONLogV0Info
(b *testing.B)
benchmark/benchmark_slog_test.go:98
Function
BenchmarkSlogJSONLogV9Info
(b *testing.B)
benchmark/benchmark_slog_test.go:103
Function
BenchmarkSlogJSONLogWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:113
Function
BenchmarkSlogJSONWithCallDepth
(b *testing.B)
benchmark/benchmark_slog_test.go:123
Function
BenchmarkSlogJSONWithName
(b *testing.B)
benchmark/benchmark_slog_test.go:118
Function
BenchmarkSlogSinkLogError
(b *testing.B)
benchmark/benchmark_slog_test.go:58
Function
BenchmarkSlogSinkLogInfoOneArg
slogSink wrapper of discard
benchmark/benchmark_slog_test.go:33
Function
BenchmarkSlogSinkLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_slog_test.go:38
Function
BenchmarkSlogSinkLogInfoWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:43
Function
BenchmarkSlogSinkLogV0Info
(b *testing.B)
benchmark/benchmark_slog_test.go:48
Function
BenchmarkSlogSinkLogV9Info
(b *testing.B)
benchmark/benchmark_slog_test.go:53
Function
BenchmarkSlogSinkWithName
(b *testing.B)
benchmark/benchmark_slog_test.go:68
Function
BenchmarkSlogSinkWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:63
Method
Enabled
(level int)
slogsink.go:68
Method
Enabled
(_ context.Context, level slog.Level)
sloghandler.go:54
Method
Enabled
(int)
testimpls_slog_test.go:78
Method
Enabled
(int)
testimpls_slog_test.go:121
Method
Enabled
(lvl int)
testimpls_test.go:40
Method
Enabled
Enabled checks whether an info message at the given level should be logged.
funcr/funcr.go:849
Method
Enabled
(_ int)
examples/tab_logger.go:44
Method
Error
(err error, msg string, kvList ...interface{})
slogsink.go:76
Method
Error
()
context.go:27
Method
Error
(_ error, msg string, kvList ...interface{})
testimpls_slog_test.go:80
Method
Error
(error, string, ...interface{})
testimpls_slog_test.go:122
Method
Error
(err error, msg string, kv ...any)
testimpls_test.go:53
Method
Error
()
benchmark/benchmark_test.go:137
Method
Error
(err error, msg string, kvList ...any)
testr/testr.go:151
Method
Error
(err error, msg string, kvList ...any)
funcr/example_formatter_test.go:63
Method
Error
()
funcr/funcr_test.go:65
Method
Error
()
funcr/funcr_test.go:83
Method
Error
()
funcr/funcr_test.go:97
Method
Error
()
funcr/funcr_test.go:104
← previous
next →
101–200 of 353, ranked by callers