Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/go-logr/logr
/ types & classes
Types & classes
79 in github.com/go-logr/logr
⨍
Functions
347
◇
Types & classes
79
↓ 5 callers
TypeAlias
PseudoStruct
PseudoStruct is a list of key-value pairs that gets logged as a struct.
funcr/funcr.go:261
↓ 1 callers
TypeAlias
forLog
example_marshaler_test.go:41
↓ 1 callers
TypeAlias
substr
Will be handled via reflection instead of type assertions.
funcr/funcr_test.go:31
Interface
CallDepthLogSink
CallDepthLogSink represents a LogSink that knows how to climb the call stack to identify the original call site and can offset the depth by a specifie
logr.go:465
Interface
CallStackHelperLogSink
CallStackHelperLogSink represents a LogSink that knows how to climb the call stack to identify the original call site and can skip intermediate helper
logr.go:497
Struct
Caller
Caller represents the original call site for a log line, after considering logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File an
funcr/funcr.go:707
Struct
Client
examples/usage_example.go:60
Struct
ComplexObjectRef
ComplexObjectRef contains more fields than it wants to get logged.
example_marshaler_secret_test.go:24
Struct
Controller
examples/usage_example.go:101
Struct
Formatter
Formatter is an opaque struct which can be embedded in a LogSink implementation. It should be constructed with NewFormatter. Some of its methods direc
funcr/funcr.go:238
Struct
List
funcr/example_test.go:116
Interface
LogSink
LogSink represents a logging implementation. End-users will generally not interact with this type.
logr.go:426
Struct
Logger
Logger is an interface to an abstract logging implementation. This is a concrete type for performance reasons, but all the real work is passed on to
logr.go:249
Interface
Marshaler
Marshaler is an optional interface that logged values may choose to implement. Loggers with structured output, such as JSON, should log the object ret
logr.go:508
TypeAlias
MessageClass
MessageClass indicates which category or categories of messages to consider.
funcr/funcr.go:146
Struct
Object
examples/usage_example.go:54
Struct
ObjectRef
ObjectRef references a Kubernetes object
example_marshaler_test.go:24
Struct
Options
Options carries parameters which influence the way logs are generated.
testr/testr.go:34
Struct
Options
Options carries parameters which influence the way logs are generated.
funcr/funcr.go:85
Struct
RuntimeInfo
RuntimeInfo holds information that the logr "core" library knows which LogSinks might want to know.
logr.go:411
Interface
SlogSink
SlogSink is an optional interface that a LogSink can implement to support logging through the slog.Logger or slog.Handler APIs better. It then should
slogr.go:94
Struct
Tembedjsontags
funcr/funcr_test.go:233
Struct
Tembednonstruct
funcr/funcr_test.go:220
Struct
Tembedstruct
funcr/funcr_test.go:215
Struct
Terror
benchmark/benchmark_test.go:118
Struct
Terror
Logging this should result in the Error() value.
funcr/funcr_test.go:95
Struct
Terrorpanic
Logging this should result in a panic.
funcr/funcr_test.go:102
Interface
TestingT
TestingT is an interface wrapper around testing.T, testing.B and testing.F.
testr/testr.go:55
TypeAlias
Tinner1
funcr/funcr_test.go:226
TypeAlias
Tinner2
funcr/funcr_test.go:227
TypeAlias
Tinner3
funcr/funcr_test.go:228
TypeAlias
Tinner4
funcr/funcr_test.go:229
TypeAlias
Tinner5
funcr/funcr_test.go:230
TypeAlias
Tinner6
funcr/funcr_test.go:231
TypeAlias
Tinnerint
funcr/funcr_test.go:211
TypeAlias
Tinnermap
funcr/funcr_test.go:212
TypeAlias
Tinnerslice
funcr/funcr_test.go:213
Struct
Tinnerstruct
funcr/funcr_test.go:208
Struct
TjsontagsArray
funcr/funcr_test.go:178
Struct
TjsontagsBool
funcr/funcr_test.go:118
Struct
TjsontagsComplex
funcr/funcr_test.go:158
Struct
TjsontagsFloat
funcr/funcr_test.go:148
Struct
TjsontagsInt
funcr/funcr_test.go:128
Struct
TjsontagsMap
funcr/funcr_test.go:198
Struct
TjsontagsPtr
funcr/funcr_test.go:168
Struct
TjsontagsSlice
funcr/funcr_test.go:188
Struct
TjsontagsString
funcr/funcr_test.go:108
Struct
TjsontagsUint
funcr/funcr_test.go:138
Struct
Tmarshaler
benchmark/benchmark_test.go:131
Struct
Tmarshaler
Logging this should result in the MarshalLog() value.
funcr/funcr_test.go:55
Struct
Tmarshalerpanic
Logging this should result in a panic.
funcr/funcr_test.go:70
Struct
Trawjson
funcr/funcr_test.go:243
Struct
Tstringer
benchmark/benchmark_test.go:105
Struct
Tstringer
Logging this should result in the String() value.
funcr/funcr_test.go:77
Struct
Tstringerpanic
Logging this should result in a panic.
funcr/funcr_test.go:88
Interface
Underlier
Underlier is implemented by the LogSink returned by NewFromLogHandler.
slogsink.go:36
Interface
Underlier
Underlier exposes access to the underlying testing.T instance. Since callers only have a logr.Logger, they have to know which implementation is in use
testr/testr.go:82
Interface
Underlier
Underlier exposes access to the underlying logging function. Since callers only have a logr.Logger, they have to know which implementation is in use,
funcr/funcr.go:70
Interface
UnderlierInterface
UnderlierInterface exposes access to the underlying TestingT instance. Since callers only have a logr.Logger, they have to know which implementation i
testr/testr.go:90
Struct
capture
funcr/funcr_test.go:865
Struct
contextKey
contextKey is how we find Loggers in a context.Context. With Go < 1.21, the value is always a Logger value. With Go >= 1.21, the value can be a Logger
context.go:22
Struct
e
funcr/example/main.go:27
Struct
e
examples/slog/main.go:33
Struct
fnlogger
fnlogger inherits some of its LogSink implementation from Formatter and just needs to add some glue code.
funcr/funcr.go:161
Struct
notFoundError
notFoundError exists to carry an IsNotFound method.
context.go:25
TypeAlias
outputFormat
outputFormat indicates which outputFormat to use.
funcr/funcr.go:251
Struct
passthruLogSink
passthruLogSink is a trivial LogSink implementation, which implements the logr.LogSink methods in terms of a slog.Handler.
testimpls_slog_test.go:73
Struct
passthruSlogSink
passthruSlogSink is a trivial SlogSink implementation, which stubs out the logr.LogSink methods and passes Logr.SlogSink thru to a slog.Handler.
testimpls_slog_test.go:117
Struct
point
point implements encoding.TextMarshaler and can be used as a map key.
funcr/funcr_test.go:41
Struct
pointErr
pointErr implements encoding.TextMarshaler but returns an error.
funcr/funcr_test.go:48
Struct
slogHandler
sloghandler.go:27
Struct
slogSink
slogsink.go:49
Struct
stdoutlogger
funcr/example_formatter_test.go:38
Struct
tabLogSink
tabLogSink is a sample logr.LogSink that logs to stderr. It's terribly inefficient, and is only a basic example.
examples/tab_logger.go:29
Struct
testCallDepthLogSink
testimpls_test.go:77
Struct
testLogSink
testLogSink is a trivial LogSink implementation, just for testing, which calls (optional) hooks on each method.
testimpls_test.go:21
Struct
testSlogSink
testSlogSink is a trivial SlogSink implementation, just for testing, which calls (optional) hooks on each method.
testimpls_slog_test.go:32
Struct
testlogger
This type exists to wrap and modify the method-set of testloggerInterface. In particular, it changes the GetUnderlying() method.
testr/testr.go:116
Struct
testloggerInterface
testr/testr.go:127