mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
source/local: log features per each hook and feature file
With `-v 4` user can now see the features originating per each file. Makes debugging easier.
This commit is contained in:
parent
afe07d6e19
commit
bd74de992f
1 changed files with 6 additions and 2 deletions
|
@ -161,7 +161,9 @@ func getFeaturesFromHooks() (map[string]string, error) {
|
|||
}
|
||||
|
||||
// Append features
|
||||
for k, v := range parseFeatures(lines, fileName) {
|
||||
fileFeatures := parseFeatures(lines, fileName)
|
||||
utils.KlogDump(4, fmt.Sprintf("features from hook %q:", fileName), " ", fileFeatures)
|
||||
for k, v := range fileFeatures {
|
||||
if old, ok := features[k]; ok {
|
||||
klog.Warningf("overriding label '%s' from another hook (%s): value changed from '%s' to '%s'",
|
||||
k, fileName, old, v)
|
||||
|
@ -236,7 +238,9 @@ func getFeaturesFromFiles() (map[string]string, error) {
|
|||
}
|
||||
|
||||
// Append features
|
||||
for k, v := range parseFeatures(lines, fileName) {
|
||||
fileFeatures := parseFeatures(lines, fileName)
|
||||
utils.KlogDump(4, fmt.Sprintf("features from feature file %q:", fileName), " ", fileFeatures)
|
||||
for k, v := range fileFeatures {
|
||||
if old, ok := features[k]; ok {
|
||||
klog.Warningf("overriding label '%s' from another features.d file (%s): value changed from '%s' to '%s'",
|
||||
k, fileName, old, v)
|
||||
|
|
Loading…
Reference in a new issue