-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
[UX] Enable/disable logs game-by-game instead of globally #4214
base: main
Are you sure you want to change the base?
Conversation
@@ -262,7 +261,7 @@ export async function launchGame( | |||
logFile: lastPlayLogFileLocation(appName), | |||
logMessagePrefix: LogPrefix.Backend, | |||
onOutput: (output) => { | |||
if (!logsDisabled) appendGamePlayLog(gameInfo, output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should add that
if (!gameSettings.verboseLogs) {
appendGamePlayLog(
gameInfo,
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.'
)
}
here as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm other than that one small thing
child.stderr.on('data', (data) => { | ||
appendGamePlayLog(gameInfo, data.toString()) | ||
child.on('error', (err: Error) => { | ||
if (gameSettings.verboseLogs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps errors should ignore this option? They're not exactly frequent after all
Currently, we can only enable/disable logs globally to log game output.
This has some issues:
This PR changes that so we can enable
verbose logs
in a game-by-game basis. Some benefits:This also enables me to do another change I want to do related to logs and UX, but I'll keep that in another PR to keep this one smaller.
Use the following Checklist if you have changed something on the Backend or Frontend: