feat: use new logger.CapturedE() api
This commit is contained in:
@ -11,7 +11,6 @@ import (
|
||||
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/agent"
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/agent/controller/openwrt/spec/sysupgrade"
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/pkg/errors"
|
||||
"gitlab.com/wpetit/goweb/logger"
|
||||
)
|
||||
@ -68,10 +67,9 @@ func (c *SysUpgradeController) Reconcile(ctx context.Context, state *agent.State
|
||||
err = errors.WithStack(err)
|
||||
logger.Error(
|
||||
ctx, "could not remove download direction",
|
||||
logger.E(err),
|
||||
logger.CapturedE(err),
|
||||
logger.F("downloadDir", downloadDir),
|
||||
)
|
||||
sentry.CaptureException(err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -9,7 +9,6 @@ import (
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/agent"
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/openwrt/uci"
|
||||
ucispec "forge.cadoles.com/Cadoles/emissary/internal/spec/uci"
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/pkg/errors"
|
||||
"gitlab.com/wpetit/goweb/logger"
|
||||
)
|
||||
@ -48,8 +47,7 @@ func (c *UCIController) Reconcile(ctx context.Context, state *agent.State) error
|
||||
|
||||
if err := c.updateConfiguration(ctx, uciSpec); err != nil {
|
||||
err = errors.WithStack(err)
|
||||
logger.Error(ctx, "could not update configuration", logger.E(err))
|
||||
sentry.CaptureException(err)
|
||||
logger.Error(ctx, "could not update configuration", logger.CapturedE(err))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user