mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-01 10:21:19 +01:00
Use eris for error management
This commit is contained in:
44 files changed
+173
-128
No files matched your search
@@ -2,14 +2,13 @@ package logger
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/rotisserie/eris"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -34,7 +33,7 @@ func TestThreshold(t *testing.T) {
|
||||
Info("this should display")
|
||||
assert.NotEmpty(t, buf.String())
|
||||
|
||||
Error("ErrorClass", errors.New("this should display"))
|
||||
Error("ErrorClass", eris.New("this should display"))
|
||||
assert.NotEmpty(t, buf.String())
|
||||
}
|
||||
|
||||
@@ -97,7 +96,7 @@ func TestError(t *testing.T) {
|
||||
LogThreshold: ErrorLevel,
|
||||
}))
|
||||
|
||||
Error("TestErrorClass", fmt.Errorf("this is a %s error", "test"))
|
||||
Error("TestErrorClass", eris.Errorf("this is a %s error", "test"))
|
||||
assert.Contains(t, buf.String(), "ERROR")
|
||||
assert.Contains(t, buf.String(), "this is a test error")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user