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

@ -10,7 +10,6 @@ import (
"forge.cadoles.com/Cadoles/emissary/internal/agent"
"forge.cadoles.com/Cadoles/emissary/internal/spec"
"github.com/getsentry/sentry-go"
"github.com/pkg/errors"
"gitlab.com/wpetit/goweb/logger"
)
@ -147,8 +146,7 @@ func (c *Controller) writeState(ctx context.Context, state *agent.State) error {
}
err = errors.WithStack(err)
logger.Error(ctx, "could not remove temporary file", logger.E(err))
sentry.CaptureException(err)
logger.Error(ctx, "could not remove temporary file", logger.CapturedE(err))
}
}()
@ -159,8 +157,7 @@ func (c *Controller) writeState(ctx context.Context, state *agent.State) error {
}
err = errors.WithStack(err)
logger.Error(ctx, "could not close temporary file", logger.E(err))
sentry.CaptureException(err)
logger.Error(ctx, "could not close temporary file", logger.CapturedE(err))
}
}()