-
Notifications
You must be signed in to change notification settings - Fork 66
Safer copy logging POC #1473
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
Safer copy logging POC #1473
Conversation
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.
@camden11, looked this over, and I like the changes! I'm good if you're ready to implement this. Perhaps it would be easier to break it down into separate PRs?
lib/projects/buildAndDeploy.ts
Outdated
`${statusStrings.SUBTASK_FAIL( | ||
failedSubtasks.length === 1 | ||
? getSubtaskName(failedSubtasks[0]) | ||
: failedSubtasks.length + ' components', | ||
displayId | ||
)}\n` | ||
); | ||
logger.log('See below for a summary of errors.'); | ||
uiLogger.log('See below for a summary of errors.'); |
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.
Add this to the lang file?
lib/projects/config.ts
Outdated
@@ -61,7 +61,7 @@ export async function getProjectConfig( | |||
projectConfig, | |||
}; | |||
} catch (e) { | |||
logger.error('Could not read from project config'); | |||
uiLogger.error('Could not read from project config'); |
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.
Add to lang file?
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.
Nice 👌 I bet we could use AI to fix the rest once Joe merges the PR to swap lang patterns
Description and Context
This creates a new typed
uiLogger
that will help prevent lang errors. TheuiLogger
is meant to be used when logging anything from the new lang objects. It only accepts strings, so it'll catch accidentalundefined
and uncalled functions. This also updates all files that use the new lang objects to useuiLogger
. It's already caught a few errors!Who to Notify
@brandenrodgers @kemmerle @joe-yeager