Skip to content

Conversation

@linsang21
Copy link
Contributor

Issue #:

Description of changes:
Default to logger from logger provider when initiate bgBlur, bgReplacement processors

Testing

  1. Have you successfully run npm run build:release locally? yes

  2. How did you test these changes? Test using react meeting demo

  3. If you made changes to the component library, have you provided corresponding documentation changes?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@linsang21 linsang21 requested a review from a team as a code owner November 7, 2024 20:57
const logger =
options?.logger ||
new ConsoleLogger('BackgroundBlurProvider', LogLevel.INFO);
const optionsLogger = options?.logger || logger;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is after the initialize right? We pass the logger to DefaultVideoTransformDevice

}) => {
const logger = useLogger();
let logger = useLogger();
logger = options?.logger || logger;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just one line let logger = options?.logger || useLogger() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there's warning for conditionally calling hooks

Copy link

@georgezy-amzn georgezy-amzn Nov 7, 2024

Choose a reason for hiding this comment

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

how about const logger = options?.logger ?? useLogger() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same warning

@linsang21 linsang21 merged commit c42aed1 into main Nov 8, 2024
1 of 2 checks passed
@linsang21 linsang21 deleted the ml-logger branch November 8, 2024 00:28
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