Manager: reduce logging of config loading

The logging was very verbose, and even though it was only at trace level,
a failing unit test would show them all.
This commit is contained in:
Sybren A. Stüvel 2022-04-15 14:34:02 +02:00
parent 4ea6f99c3e
commit 13e3607571

View File

@ -319,9 +319,9 @@ func (c *Conf) constructVariableLookupTable() {
c.constructVariableLookupTableForVars(c.Variables) c.constructVariableLookupTableForVars(c.Variables)
c.constructVariableLookupTableForVars(c.implicitVariables) c.constructVariableLookupTableForVars(c.implicitVariables)
log.Trace(). // log.Trace().
Interface("variables", c.Variables). // Interface("variables", c.Variables).
Msg("constructed lookup table") // Msg("constructed lookup table")
} }
func (c *Conf) constructVariableLookupTableForVars(vars map[string]Variable) { func (c *Conf) constructVariableLookupTableForVars(vars map[string]Variable) {
@ -334,10 +334,10 @@ func (c *Conf) constructVariableLookupTableForVars(vars map[string]Variable) {
} }
concreteAudiences = append(concreteAudiences, audience) concreteAudiences = append(concreteAudiences, audience)
} }
log.Trace(). // log.Trace().
Interface("concreteAudiences", concreteAudiences). // Interface("concreteAudiences", concreteAudiences).
Interface("isWildcard", isWildcard). // Interface("isWildcard", isWildcard).
Msg("constructing variable lookup table") // Msg("constructing variable lookup table")
// Just for brevity. // Just for brevity.
lookup := c.VariablesLookup lookup := c.VariablesLookup
@ -358,21 +358,21 @@ func (c *Conf) constructVariableLookupTableForVars(vars map[string]Variable) {
if lookup[audience][platform] == nil { if lookup[audience][platform] == nil {
lookup[audience][platform] = map[string]string{} lookup[audience][platform] = map[string]string{}
} }
log.Trace(). // log.Trace().
Str("audience", string(audience)). // Str("audience", string(audience)).
Str("platform", string(platform)). // Str("platform", string(platform)).
Str("name", name). // Str("name", name).
Str("value", value). // Str("value", value).
Msg("setting variable") // Msg("setting variable")
lookup[audience][platform][name] = value lookup[audience][platform][name] = value
} }
// Construct the lookup table for each audience+platform+name // Construct the lookup table for each audience+platform+name
for name, variable := range vars { for name, variable := range vars {
log.Trace(). // log.Trace().
Str("name", name). // Str("name", name).
Interface("variable", variable). // Interface("variable", variable).
Msg("handling variable") // Msg("handling variable")
for _, value := range variable.Values { for _, value := range variable.Values {
// Two-way values should not end in path separator. // Two-way values should not end in path separator.