Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The logger was previously available on the Config object as well as from
the context via
logr.FromContext(ctx)
. While they are the same rootlogger, each has a different set of names and values applied to each log
line.
Loading the logger from the context is the preferred approach moving
forward. The logger on the Config is still available, but is deprecated
and will be removed in a future release. The first use of the
c.Log
methods will trigger an error printed to the log.
Each reconciler in the call chain can enrich the logger as it is passed
deeper in the reconciler hierarchy. Many reconciler have a new
Name
field that is appended to the logger's name for all log statements under
it.
ParentReconciler
,ChildReconciler
andCastParent
providedefault names based on the type they are reconciling. Unique names are
recommended, but are not required, since they only appear in logs and do
not affect the runtime behavior.
Signed-off-by: Scott Andrews andrewssc@vmware.com