Skip to content

Commit bb96681

Browse files
authored
[#175]: chore: incorrect error usage in logs
2 parents 02d7980 + c5dffb7 commit bb96681

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

go.work.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
22
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
33
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
44
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
5+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
56
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
67
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
78
go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg=

poller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func (e *Endure) poll(r *result) {
1212
continue
1313
}
1414
// log error message
15-
e.log.Error("plugin returned an error from the Serve method", err, slog.String("plugin", res.vertexID))
15+
e.log.Error("plugin returned an error from the 'Serve' method", slog.Any("error", err), slog.String("plugin", res.vertexID))
1616
// set the error
1717
res.err = err
1818
// send handleErrorCh signal

stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (e *Endure) stop() error {
5353

5454
ret := stopMethod.Func.Call(inVals)[0].Interface()
5555
if ret != nil {
56-
e.log.Error("failed to stop the plugin", slog.String("error", ret.(error).Error()))
56+
e.log.Error("failed to stop the plugin", slog.Any("error", ret.(error)))
5757
mu.Lock()
5858
errs = append(errs, ret.(error))
5959
mu.Unlock()

0 commit comments

Comments
 (0)