feat(logging); improve messages and errors (#336)

* feat(logger): add module context

* feat(logger): change errors package

* feat(logger): update tests
This commit is contained in:
Ludvig Lundgren 2022-07-05 13:31:44 +02:00 committed by GitHub
parent 95471a4cf7
commit 0e88117702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 1172 additions and 957 deletions

View file

@ -5,6 +5,7 @@ import (
"github.com/autobrr/autobrr/internal/domain"
"github.com/autobrr/autobrr/internal/logger"
"github.com/stretchr/testify/assert"
)
@ -63,7 +64,7 @@ func Test_service_parseExecArgs(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
s := &service{
log: logger.Mock(),
log: logger.Mock().With().Logger(),
repo: nil,
clientSvc: nil,
bus: nil,
@ -102,7 +103,7 @@ func Test_service_execCmd(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
s := &service{
log: logger.Mock(),
log: logger.Mock().With().Logger(),
repo: nil,
clientSvc: nil,
bus: nil,