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

sdkServer.logLevel in Gameserver config doesn't seem to be used in local mode #2221

Closed
barankyle opened this issue Aug 13, 2021 · 4 comments · Fixed by #2580
Closed

sdkServer.logLevel in Gameserver config doesn't seem to be used in local mode #2221

barankyle opened this issue Aug 13, 2021 · 4 comments · Fixed by #2580
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs.
Milestone

Comments

@barankyle
Copy link

What happened:
I'm trying to change sdkServer.logLevel when running the SDK server locally, but it doesn't appear to have any effect. Setting it to 'Debug' doesn't seem to print out any more messages than the default value of 'Info', and when setting it to 'Error', I still see the Info-level messages.

What you expected to happen:
Setting sdkServer.logLevel to Error would hide all the Info-level messages, and setting it to Debug would output more than just the Info-level messages

How to reproduce it (as minimally and precisely as possible):
Run the sdk server locally and pass in the example Gameserver config file, only change sdkServer.logLevel from 'Info' to 'Error' (or 'Debug'):
./sdk-server.linux.amd64 --local -f gameserver.yml

Info-level logging statements will be output when logLevel is set to 'Error', and no additional logging statements will be output when logLevel is set to 'Debug'.

Additionally, when calling curl -GET "http://localhost:9358/gameserver" -H "accept: application/json", the returned information doesn't contain anything about sdkServer (though I'm not sure if it's supposed to).

Anything else we need to know?:

Environment:

  • Agones version: 1.16.0
  • Kubernetes version (use kubectl version): none (running locally with --local)
  • Cloud provider or hardware configuration: none (running locally with --local)
  • Install method (yaml/helm): Downloaded .zip of sdk-server files and extracted them
  • Troubleshooting guide log(s):
  • Others:
@barankyle barankyle added the kind/bug These are bugs. label Aug 13, 2021
@markmandel
Copy link
Member

'm trying to change sdkServer.logLevel when running the SDK server locally, but it doesn't appear to have any effect.

So I'm super curious now 😄 . What's the use case?

(I'm actually not sure if we even have any debug level logging in there? 🤔 )

@markmandel markmandel added good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! labels Aug 13, 2021
@barankyle
Copy link
Author

One of our engineers wanted to cut down on the noise of all the info-level messages like health pings when doing local development.

As for debug-level logs, maybe there aren't any! I assumed from the inclusion of that option that there were, but maybe it's just a forward-thinking option.

@markmandel
Copy link
Member

Interesting, legit bug.

Looks like we should grab https://github.com/googleforgames/agones/blob/main/pkg/sdkserver/sdkserver.go#L207-L219 and port it into the local SDK, probably as part of setGameServerFromFilePath so that file reload works.

@barankyle
Copy link
Author

Thanks for fixing this!

@SaitejaTamma SaitejaTamma added this to the 1.24.0 milestone Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants