Skip to content

Conversation

@camden11
Copy link
Contributor

@camden11 camden11 commented Apr 29, 2025

Description and Context

This creates a new typed uiLogger that will help prevent lang errors. The uiLogger is meant to be used when logging anything from the new lang objects. It only accepts strings, so it'll catch accidental undefined and uncalled functions. This also updates all files that use the new lang objects to use uiLogger. It's already caught a few errors!

Who to Notify

@brandenrodgers @kemmerle @joe-yeager

Copy link
Contributor

@kemmerle kemmerle left a 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?

@camden11 camden11 requested a review from kemmerle April 30, 2025 15:57
)}\n`
);
logger.log('See below for a summary of errors.');
uiLogger.log('See below for a summary of errors.');
Copy link
Contributor

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?

};
} catch (e) {
logger.error('Could not read from project config');
uiLogger.error('Could not read from project config');
Copy link
Contributor

Choose a reason for hiding this comment

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

Add to lang file?

brandenrodgers
brandenrodgers previously approved these changes Apr 30, 2025
Copy link
Contributor

@brandenrodgers brandenrodgers left a 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

@camden11 camden11 merged commit e13504f into main Apr 30, 2025
1 check passed
@camden11 camden11 deleted the safe-copy-logging branch April 30, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants