Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camelCase playerID in log statements #2041

Merged
merged 1 commit into from
Apr 3, 2021

Conversation

mthssdrbrg
Copy link
Contributor

Noticed this while browsing the source, and to be consistent with other logs, as they seem to be using playerID instead of PlayerID.

What type of PR is this?

/kind cleanup

@google-cla
Copy link

google-cla bot commented Apr 2, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Apr 2, 2021
@mthssdrbrg mthssdrbrg changed the title Camelcase plaerID in logs Camelcase playerID in log statements Apr 2, 2021
@mthssdrbrg mthssdrbrg changed the title Camelcase playerID in log statements camelCase playerID in log statements Apr 2, 2021
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c53fb50a-efed-4a3a-9b9e-1a726c1bd87d

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/2041/head:pr_2041 && git checkout pr_2041
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.14.0-6d848ca

@mthssdrbrg
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Apr 2, 2021
@roberthbailey
Copy link
Member

Which logs did you see that used playerID? The only other place where I see a log statement is

l.logger.WithField("playerID", id.PlayerID).Info("Player Connected")
.

@markmandel
Copy link
Member

Which logs did you see that used playerID? The only other place where I see a log statement is

l.logger.WithField("playerID", id.PlayerID).Info("Player Connected")

.

Doing a quick search for .withField(...) - we do tend to standardise on starting with lowercase for key names. So seems like a reasonable cleanup?

@roberthbailey
Copy link
Member

So seems like a reasonable cleanup?

SGTM.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mthssdrbrg, roberthbailey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mthssdrbrg
Copy link
Contributor Author

Just noticed that the logging in pkg/sdkserver/sdkserver.go uses playerId with a lowercase d whereas the logging in pkg/sdkserver/localsdk.go uses playerID 😅.

Suppose it would make sense to go with the Go way of capitalizing ID?

@roberthbailey
Copy link
Member

Yes - it would be nice to match style.

@markmandel
Copy link
Member

Just noticed that the logging in pkg/sdkserver/sdkserver.go uses playerId with a lowercase d whereas the logging in pkg/sdkserver/localsdk.go uses playerID .

Suppose it would make sense to go with the Go way of capitalizing ID?

+1 from me.

To be consistent with other logs, as they seem to be using `playerID`
instead of `PlayerID`.
@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@mthssdrbrg
Copy link
Contributor Author

Sweet, done, and rebased on latest main.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: d353d817-fd6e-4888-a1ef-06e5d97e5c7e

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: a55c1d54-eff9-4b68-8e70-01a7bb79b5ca

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/2041/head:pr_2041 && git checkout pr_2041
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.14.0-0761b46

@markmandel markmandel merged commit 1dc6277 into googleforgames:main Apr 3, 2021
@markmandel markmandel added the kind/cleanup Refactoring code, fixing up documentation, etc label Apr 3, 2021
@markmandel markmandel added this to the 1.14.0 milestone Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cla: yes kind/cleanup Refactoring code, fixing up documentation, etc size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants