component-base/logs: refactor registry

Moving the registry into its own package will avoid dependency cycles in future
PRs.

Creating loggers through a factory instead of storing pre-created instances
will make it possible to create the loggers differently depending on
configuration parameters.

The factory can also be used to provide additional meta data before creating
instances.
This commit is contained in:
Patrick Ohly
2021-10-07 15:12:45 +02:00
parent 79ee735bad
commit ce35b7dbc3
7 changed files with 42 additions and 26 deletions

1
vendor/modules.txt vendored
View File

@@ -1952,6 +1952,7 @@ k8s.io/component-base/logs/datapol
k8s.io/component-base/logs/json
k8s.io/component-base/logs/json/register
k8s.io/component-base/logs/logreduction
k8s.io/component-base/logs/registry
k8s.io/component-base/logs/sanitization
k8s.io/component-base/logs/testinit
k8s.io/component-base/metrics