Skip to content

[Logs] New option to disable logs #2773

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

Merged
merged 2 commits into from
Jun 20, 2023
Merged

[Logs] New option to disable logs #2773

merged 2 commits into from
Jun 20, 2023

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Jun 3, 2023

This should fix #2733

  • added an option to Disable logs. I put the option under Advanced so users are more careful when turning this toggle ON.
  • added a new forceLog option when calling the log functions that will ignore this setting
  • in many places we are writing/appending directly to a log file, added a check around those (but ideally we should move some of that into log* calls)
  • some things are always logged just in case
  • added a warning message in the logs when logs are disabled, so if somebody share a weird looking log we can see if the reason is logs being disabled

The benefit of this is to avoid 2 things:

  • writing to disk can be resource intensive, specially on slow disks and for games with a lot of output
  • even for games with not much output, if playing for long periods of time the logs can grow really big

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jun 3, 2023
@arielj arielj requested review from a team, flavioislima, CommandMC, Nocccer and imLinguin and removed request for a team June 3, 2023 20:18
@Nocccer
Copy link
Collaborator

Nocccer commented Jun 11, 2023

Just an Idea for another pr. We could add a selektive Play Button where people can choose play and play (Logs).

Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arielj arielj merged commit d3335d9 into main Jun 20, 2023
@arielj arielj deleted the disable-logs branch June 20, 2023 02:14
@salihmarangoz
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to disable logging globally
4 participants