Skip to content

Commit d3f3595

Browse files
authored
Merge pull request #1203 from vincepri/more-doc-loggerfrom
📖 Add more details for what's included in a logger
2 parents d057d46 + 07bd3b9 commit d3f3595

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

alias.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ var (
126126
Log = log.Log
127127

128128
// LoggerFrom returns a logger with predefined values from a context.Context.
129+
// The logger, when used with controllers, can be expected to contain basic information about the object
130+
// that's being reconciled like:
131+
// - `reconcilerGroup` and `reconcilerKind` coming from the For(...) object passed in when building a controller.
132+
// - `name` and `namespace` injected from the reconciliation request.
129133
//
130134
// This is meant to be used with the context supplied in a struct that satisfies the Reconciler interface.
131135
LoggerFrom = log.FromContext

0 commit comments

Comments
 (0)