Skip to content

Commit

Permalink
fix: drop reserved source key in slog.Logger
Browse files Browse the repository at this point in the history
The `source` key in slog.Logger is a reserved key and should not be used because it causes a panic.
This commit removes the `source` key from the logger.

Note: We already enforce the forbidden keys as per #42049.
However, our lint jobs currently only run on Ubuntu runners, while the code in question compiles for Darwin targets only.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
  • Loading branch information
tigrato authored and github-actions committed Jun 22, 2024
1 parent 2ebd623 commit cea0548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vnet/dns/osnameservers_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ func (s *OSUpstreamNameserverSource) upstreamNameservers(ctx context.Context) ([
nameservers = append(nameservers, nameserver)
}

slog.DebugContext(ctx, "Loaded host upstream nameservers.", "nameservers", nameservers, "source", confFilePath)
slog.DebugContext(ctx, "Loaded host upstream nameservers.", "nameservers", nameservers, "config_file", confFilePath)
return nameservers, nil
}

0 comments on commit cea0548

Please sign in to comment.