Skip to content

Commit

Permalink
Swap to using slog in msteams app
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardDowling committed Oct 23, 2024
1 parent b07f29b commit f9fa0fa
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions integrations/access/msteams/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ const (
type App struct {
conf Config

apiClient teleport.Client
bot *Bot
mainJob lib.ServiceJob
watcherJob lib.ServiceJob
pd *pd.CompareAndSwap[PluginData]
apiClient teleport.Client
bot *Bot
mainJob lib.ServiceJob
watcherJob lib.ServiceJob
pd *pd.CompareAndSwap[PluginData]
log *slog.Logger
accessMonitoringRules *accessmonitoring.RuleHandler

Expand Down Expand Up @@ -185,10 +185,10 @@ func (a *App) initBot(ctx context.Context) error {
"id", teamsApp.ID)

if err := a.bot.CheckHealth(ctx); err != nil {
log.WithField("name", teamsApp.DisplayName).
WithField("id", teamsApp.ID).
WithError(err).
Warn("MS Teams healthcheck failed")

a.log.WarnContext(ctx, "MS Teams healthcheck failed",
"name", teamsApp.DisplayName,
"id", teamsApp.ID)
}

if !a.conf.Preload {
Expand Down Expand Up @@ -258,7 +258,6 @@ func (a *App) run(ctx context.Context) error {
return trace.Wrap(err, "initializing Access Monitoring Rule cache")
}
}
log := logger.Get(ctx)

a.watcherJob = watcherJob
a.watcherJob.SetReady(ok)
Expand Down

0 comments on commit f9fa0fa

Please sign in to comment.