MCPcopy Create free account

hub / github.com/go-logr/logr / functions

Functions353 in github.com/go-logr/logr

↓ 1 callersMethodWithName
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 callersMethodWithSink
WithSink returns a copy of the logger with the new sink.
logr.go:235
↓ 1 callersFunctioncontainsOne
(hay string, needles ...string)
internal/testhelp/slog.go:71
↓ 1 callersFunctiondoSlog
(log logr.Logger)
funcr/example/main_slog.go:28
↓ 1 callersFunctionexpectEqual
(t *testing.T, expected, actual any)
slogr_test.go:193
↓ 1 callersFunctiongetCaller
(depth int)
logr_test.go:405
↓ 1 callersFunctionhelper2
(log logr.Logger, msg string)
testr/testr_test.go:85
↓ 1 callersFunctionhelper2
(log logr.Logger, msg string)
funcr/example/main.go:39
↓ 1 callersFunctionhelper2
(log logr.Logger, msg string)
testing/test_test.go:48
↓ 1 callersFunctioninvokeError
(e error)
funcr/funcr.go:749
↓ 1 callersFunctioninvokeMarshaler
(m logr.Marshaler)
funcr/funcr.go:731
↓ 1 callersFunctioninvokeStringer
(s fmt.Stringer)
funcr/funcr.go:740
↓ 1 callersFunctionisEmpty
(v reflect.Value)
funcr/funcr.go:711
↓ 1 callersFunctionkvListToAttrs
(kvList ...interface{})
slogsink.go:109
↓ 1 callersMethodlevelFromSlog
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 callersFunctionline
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 callersFunctionlogError
Error logging implementation shared between testLogger and testLoggerInterface.
testr/testr.go:105
↓ 1 callersFunctionlogInfo
Info logging implementation shared between testLogger and testLoggerInterface.
testr/testr.go:95
↓ 1 callersFunctionlogrExample
(log logr.Logger)
funcr/example/main.go:58
↓ 1 callersFunctionlogrExample
(log logr.Logger)
examples/slog/main.go:77
↓ 1 callersFunctionlogrHelper
(log logr.Logger, msg string)
examples/slog/main.go:40
↓ 1 callersFunctionlogrHelper2
(log logr.Logger, msg string)
examples/slog/main.go:44
↓ 1 callersFunctionneedsEscape
needsEscape determines whether the input string needs to be escaped or not, without doing any allocations.
funcr/funcr.go:702
↓ 1 callersMethodprettyWithFlags
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 callersFunctionptrint
(i int)
funcr/funcr_test.go:33
↓ 1 callersMethodrenderGroup
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 callersMethodsinkWithCallDepth
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 callersFunctionslogExample
(log *slog.Logger)
funcr/example/main_slog.go:33
↓ 1 callersFunctionslogExample
(log *slog.Logger)
examples/slog/main.go:90
↓ 1 callersFunctionslogHelper
(log *slog.Logger, msg string)
examples/slog/main.go:48
↓ 1 callersFunctionslogHelper2
(log *slog.Logger, msg string)
examples/slog/main.go:52
↓ 1 callersMethodsnippet
snippet produces a short snippet string of an arbitrary value.
funcr/funcr.go:797
↓ 1 callersMethodstartGroup
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
FunctionBenchmarkDiscardLogError
(b *testing.B)
benchmark/benchmark_test.go:195
FunctionBenchmarkDiscardLogInfoOneArg
discard
benchmark/benchmark_test.go:165
FunctionBenchmarkDiscardLogInfoPointerArgs
(b *testing.B)
benchmark/benchmark_test.go:175
FunctionBenchmarkDiscardLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_test.go:170
FunctionBenchmarkDiscardLogInfoWithValues
(b *testing.B)
benchmark/benchmark_test.go:180
FunctionBenchmarkDiscardLogV0Info
(b *testing.B)
benchmark/benchmark_test.go:185
FunctionBenchmarkDiscardLogV9Info
(b *testing.B)
benchmark/benchmark_test.go:190
FunctionBenchmarkDiscardWithName
(b *testing.B)
benchmark/benchmark_test.go:205
FunctionBenchmarkDiscardWithValues
(b *testing.B)
benchmark/benchmark_test.go:200
FunctionBenchmarkFuncrJSONLogError
(b *testing.B)
benchmark/benchmark_test.go:277
FunctionBenchmarkFuncrJSONLogInfoErrorValue
(b *testing.B)
benchmark/benchmark_test.go:302
FunctionBenchmarkFuncrJSONLogInfoMarshalerValue
(b *testing.B)
benchmark/benchmark_test.go:307
FunctionBenchmarkFuncrJSONLogInfoOneArg
(b *testing.B)
benchmark/benchmark_test.go:222
FunctionBenchmarkFuncrJSONLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_test.go:237
FunctionBenchmarkFuncrJSONLogInfoStringerValue
(b *testing.B)
benchmark/benchmark_test.go:297
FunctionBenchmarkFuncrJSONLogInfoWithValues
(b *testing.B)
benchmark/benchmark_test.go:247
FunctionBenchmarkFuncrJSONLogV0Info
(b *testing.B)
benchmark/benchmark_test.go:257
FunctionBenchmarkFuncrJSONLogV9Info
(b *testing.B)
benchmark/benchmark_test.go:267
FunctionBenchmarkFuncrLogError
(b *testing.B)
benchmark/benchmark_test.go:272
FunctionBenchmarkFuncrLogInfoOneArg
(b *testing.B)
benchmark/benchmark_test.go:217
FunctionBenchmarkFuncrLogInfoPointerArgs
(b *testing.B)
benchmark/benchmark_test.go:232
FunctionBenchmarkFuncrLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_test.go:227
FunctionBenchmarkFuncrLogInfoWithValues
(b *testing.B)
benchmark/benchmark_test.go:242
FunctionBenchmarkFuncrLogV0Info
(b *testing.B)
benchmark/benchmark_test.go:252
FunctionBenchmarkFuncrLogV9Info
(b *testing.B)
benchmark/benchmark_test.go:262
FunctionBenchmarkFuncrWithCallDepth
(b *testing.B)
benchmark/benchmark_test.go:292
FunctionBenchmarkFuncrWithName
(b *testing.B)
benchmark/benchmark_test.go:287
FunctionBenchmarkFuncrWithValues
(b *testing.B)
benchmark/benchmark_test.go:282
FunctionBenchmarkSlogJSONLogError
(b *testing.B)
benchmark/benchmark_slog_test.go:108
FunctionBenchmarkSlogJSONLogInfoErrorValue
(b *testing.B)
benchmark/benchmark_slog_test.go:133
FunctionBenchmarkSlogJSONLogInfoMarshalerValue
(b *testing.B)
benchmark/benchmark_slog_test.go:138
FunctionBenchmarkSlogJSONLogInfoOneArg
(b *testing.B)
benchmark/benchmark_slog_test.go:83
FunctionBenchmarkSlogJSONLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_slog_test.go:88
FunctionBenchmarkSlogJSONLogInfoStringerValue
(b *testing.B)
benchmark/benchmark_slog_test.go:128
FunctionBenchmarkSlogJSONLogInfoWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:93
FunctionBenchmarkSlogJSONLogV0Info
(b *testing.B)
benchmark/benchmark_slog_test.go:98
FunctionBenchmarkSlogJSONLogV9Info
(b *testing.B)
benchmark/benchmark_slog_test.go:103
FunctionBenchmarkSlogJSONLogWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:113
FunctionBenchmarkSlogJSONWithCallDepth
(b *testing.B)
benchmark/benchmark_slog_test.go:123
FunctionBenchmarkSlogJSONWithName
(b *testing.B)
benchmark/benchmark_slog_test.go:118
FunctionBenchmarkSlogSinkLogError
(b *testing.B)
benchmark/benchmark_slog_test.go:58
FunctionBenchmarkSlogSinkLogInfoOneArg
slogSink wrapper of discard
benchmark/benchmark_slog_test.go:33
FunctionBenchmarkSlogSinkLogInfoSeveralArgs
(b *testing.B)
benchmark/benchmark_slog_test.go:38
FunctionBenchmarkSlogSinkLogInfoWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:43
FunctionBenchmarkSlogSinkLogV0Info
(b *testing.B)
benchmark/benchmark_slog_test.go:48
FunctionBenchmarkSlogSinkLogV9Info
(b *testing.B)
benchmark/benchmark_slog_test.go:53
FunctionBenchmarkSlogSinkWithName
(b *testing.B)
benchmark/benchmark_slog_test.go:68
FunctionBenchmarkSlogSinkWithValues
(b *testing.B)
benchmark/benchmark_slog_test.go:63
MethodEnabled
(level int)
slogsink.go:68
MethodEnabled
(_ context.Context, level slog.Level)
sloghandler.go:54
MethodEnabled
(int)
testimpls_slog_test.go:78
MethodEnabled
(int)
testimpls_slog_test.go:121
MethodEnabled
(lvl int)
testimpls_test.go:40
MethodEnabled
Enabled checks whether an info message at the given level should be logged.
funcr/funcr.go:849
MethodEnabled
(_ int)
examples/tab_logger.go:44
MethodError
(err error, msg string, kvList ...interface{})
slogsink.go:76
MethodError
()
context.go:27
MethodError
(_ error, msg string, kvList ...interface{})
testimpls_slog_test.go:80
MethodError
(error, string, ...interface{})
testimpls_slog_test.go:122
MethodError
(err error, msg string, kv ...any)
testimpls_test.go:53
MethodError
()
benchmark/benchmark_test.go:137
MethodError
(err error, msg string, kvList ...any)
testr/testr.go:151
MethodError
(err error, msg string, kvList ...any)
funcr/example_formatter_test.go:63
MethodError
()
funcr/funcr_test.go:65
MethodError
()
funcr/funcr_test.go:83
MethodError
()
funcr/funcr_test.go:97
MethodError
()
funcr/funcr_test.go:104
← previousnext →101–200 of 353, ranked by callers