Skip to content

Commit

Permalink
chore(log): Shorten logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Aug 15, 2023
1 parent a3abb4f commit 220e3d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/device/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import (
)

func Watch(ctx context.Context, entry castdns.CastEntry) {
logGroup := slog.Group("device", "type", entry.Device, "name", entry.DeviceName)
var logGroup slog.Attr
if entry.DeviceName != "" {
logGroup = slog.String("device", entry.DeviceName)
} else {
logGroup = slog.String("device", entry.Device)
}

slog.With(logGroup).Info("Found cast device")

Expand Down

0 comments on commit 220e3d1

Please sign in to comment.