Skip to content

Commit

Permalink
signalmeow/profile: use structured logging
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Dec 30, 2023
1 parent 3d6a2c7 commit bb7615b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/signalmeow/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ func fetchProfileByID(ctx context.Context, d *Device, signalID string) (*Profile
path := "/v1/profile/" + signalID
useUnidentified := profileKeyVersion != nil && accessKey != nil
if useUnidentified {
zlog.Trace().Msgf("Using unidentified profile request with profileKeyVersion: %v", profileKeyVersion)
zlog.Trace().
Hex("profile_key_version", profileKeyVersion[:]).
Msg("Using unidentified profile request")
// Assuming we can just make the version bytes into a string
path += "/" + profileKeyVersion.String()
}
Expand Down Expand Up @@ -286,7 +288,7 @@ func fetchAndDecryptAvatarImage(d *Device, avatarPath string, profileKey *libsig
Username: &username,
Password: &password,
}
zlog.Info().Msgf("Fetching profile avatar from %v", avatarPath)
zlog.Info().Str("avatar_path", avatarPath).Msg("Fetching profile avatar")
resp, err := web.SendHTTPRequest("GET", avatarPath, opts)
if err != nil {
zlog.Err(err).Msg("error fetching profile avatar")
Expand Down

0 comments on commit bb7615b

Please sign in to comment.