Fix log message
This commit is contained in:
parent
9f1794b97e
commit
a1866c7ff3
1 changed files with 2 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ func (p *players) Register(ctx context.Context, id, client, userAgent, ip string
|
||||||
if err != nil || id == "" {
|
if err != nil || id == "" {
|
||||||
plr, err = p.ds.Player(ctx).FindMatch(user.ID, client, userAgent)
|
plr, err = p.ds.Player(ctx).FindMatch(user.ID, client, userAgent)
|
||||||
if err == nil {
|
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 {
|
} else {
|
||||||
plr = &model.Player{
|
plr = &model.Player{
|
||||||
ID: uuid.NewString(),
|
ID: uuid.NewString(),
|
||||||
|
|
@ -46,7 +46,7 @@ func (p *players) Register(ctx context.Context, id, client, userAgent, ip string
|
||||||
Client: client,
|
Client: client,
|
||||||
ScrobbleEnabled: true,
|
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)
|
plr.Name = fmt.Sprintf("%s [%s]", client, userAgent)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue