Skip to content

RuntimeConfig: Update logger fields for runtime updates #309

@oxzi

Description

@oxzi

When updating a channel name within the web UI, the logs are still using the old name. This happens because the logger is created within the createFn but not altered/recreated in the updateFn.

newElement.Start(context.TODO(), r.logs.GetChildLogger("channel").With(
zap.Int64("id", newElement.ID),
zap.String("name", newElement.Name)))

func(curElement, update *channel.Channel) error {
curElement.ChangedAt = update.ChangedAt
curElement.Name = update.Name
curElement.Type = update.Type
curElement.Config = update.Config
curElement.Restart()
return nil
},

This pattern should be checked for each runtime update, not only for channels.

Reported by @sukhwinder33445, thanks!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions