feat: use new logger.CapturedE() api

This commit is contained in:
2023-10-19 22:09:18 +02:00
parent b0898eefc3
commit ce9b3003fe
18 changed files with 58 additions and 131 deletions

View File

@ -5,7 +5,6 @@ import (
"forge.cadoles.com/Cadoles/emissary/internal/command/common"
"github.com/getsentry/sentry-go"
"github.com/pkg/errors"
"github.com/urfave/cli/v2"
"gitlab.com/wpetit/goweb/logger"
@ -34,8 +33,7 @@ func PingCommand() *cli.Command {
defer func() {
if err := db.Close(); err != nil {
err = errors.WithStack(err)
logger.Error(ctx.Context, "error while closing database connection", logger.E(err))
sentry.CaptureException(err)
logger.Error(ctx.Context, "error while closing database connection", logger.CapturedE(err))
}
}()