-
Notifications
You must be signed in to change notification settings - Fork 157
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
Use pass in logger for ml modules #969
Conversation
const logger = | ||
options?.logger || | ||
new ConsoleLogger('BackgroundBlurProvider', LogLevel.INFO); | ||
const optionsLogger = options?.logger || logger; |
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.
This is after the initialize right? We pass the logger to DefaultVideoTransformDevice
@@ -51,7 +49,8 @@ export const BackgroundBlurProvider: FC<React.PropsWithChildren<Props>> = ({ | |||
options, | |||
children, | |||
}) => { | |||
const logger = useLogger(); | |||
let logger = useLogger(); | |||
logger = options?.logger || logger; |
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.
Why not just one line let logger = options?.logger || useLogger()
?
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.
there's warning for conditionally calling hooks
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.
how about const logger = options?.logger ?? useLogger()
?
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.
same warning
Issue #:
Description of changes:
Default to logger from logger provider when initiate bgBlur, bgReplacement processors
Testing
Have you successfully run
npm run build:release
locally? yesHow did you test these changes? Test using react meeting demo
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.