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

[Tech] Refactor how we write to game logs #3355

Merged
merged 1 commit into from
Jan 1, 2024
Merged

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Dec 27, 2023

We currently use explicit calls to writeFileSync and appendFileSync when we want to write game logs. This PR extracts that into more descriptive logger helper methods (initGameLog and appendGameLog) to simplify the usage so we can abstract the actual file name calculation and writing of the content.

I'm doing this because I want to add more logging and make it all async in the future, so I want to first simplify the API.

Nothing is changed in the functionality, logs should work just the same as before.


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 Dec 27, 2023
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team December 27, 2023 17:34
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 2f5ab63 into main Jan 1, 2024
9 checks passed
@arielj arielj deleted the refactor-game-logging branch January 1, 2024 23:01
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

2 participants