mirror of
https://github.com/coredns/coredns.git
synced 2025-11-29 15:14:02 -05:00
fix: kubernetes plugin logging (#7727)
The plugin dropped the actual error message from the log, so the log becomes completely useless. Before: ``` [ERROR] plugin/kubernetes: error Failed to watch ``` After: ``` [ERROR] plugin/kubernetes: Failed to watch: failed to list *v1.Namespace: Get "https://10.96.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0": tls: failed to parse certificate from server: x509: SAN dNSName is malformed ``` Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
@@ -25,8 +25,8 @@ func (l *loggerAdapter) Info(_ int, msg string, _ ...any) {
|
|||||||
l.P.Info(msg)
|
l.P.Info(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *loggerAdapter) Error(_ error, msg string, _ ...any) {
|
func (l *loggerAdapter) Error(err error, msg string, _ ...any) {
|
||||||
l.P.Error(msg)
|
l.Errorf("%s: %s", msg, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *loggerAdapter) WithValues(_ ...any) logr.LogSink {
|
func (l *loggerAdapter) WithValues(_ ...any) logr.LogSink {
|
||||||
|
|||||||
Reference in New Issue
Block a user