Skip to content

🎧 Your Personal Streaming Service

Fix log message

Deluana1866c7ff38f
diff --git a/core/players.go b/core/players.go
index f62ca9cca..3323516c6 100644
--- a/core/players.go
+++ b/core/players.go
@@ -38,7 +38,7 @@ func (p *players) Register(ctx context.Context, id, client, userAgent, ip string
if err != nil || id == "" {
plr, err = p.ds.Player(ctx).FindMatch(user.ID, client, userAgent)
if err == nil {
- log.Debug(ctx, "Found matching player", "id", plr.ID, "client", client, "username", userName, "type", userAgent)
+ log.Debug(ctx, "Found matching player", "id", plr.ID, "client", client, "username", userName(ctx), "type", userAgent)
} else {
plr = &model.Player{
ID: uuid.NewString(),
@@ -46,7 +46,7 @@ func (p *players) Register(ctx context.Context, id, client, userAgent, ip string
Client: client,
ScrobbleEnabled: true,
}
- log.Info(ctx, "Registering new player", "id", plr.ID, "client", client, "username", userName, "type", userAgent)
+ log.Info(ctx, "Registering new player", "id", plr.ID, "client", client, "username", userName(ctx), "type", userAgent)
}
}
plr.Name = fmt.Sprintf("%s [%s]", client, userAgent)