Skip to content

Commit

Permalink
Use pass in logger for ml modules
Browse files Browse the repository at this point in the history
  • Loading branch information
linsang21 committed Nov 7, 2024
1 parent a2d7461 commit 74b62db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Change to use loggers from `LoggerProvider` as default when initialize background blur/replacement processor.

### Fixed

## [3.9.0] - 2024-04-12
Expand Down
6 changes: 2 additions & 4 deletions src/providers/BackgroundBlurProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,10 @@ export const BackgroundBlurProvider: FC<React.PropsWithChildren<Props>> = ({
);
const currentProcessor = await initializeBackgroundBlur();
try {
const logger =
options?.logger ||
new ConsoleLogger('BackgroundBlurProvider', LogLevel.INFO);
const optionsLogger = options?.logger || logger;
if (currentProcessor) {
const chosenVideoTransformDevice = new DefaultVideoTransformDevice(
logger,
optionsLogger,
selectedDevice,
[currentProcessor]
);
Expand Down
6 changes: 2 additions & 4 deletions src/providers/BackgroundReplacementProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,10 @@ export const BackgroundReplacementProvider: FC<
);
const currentProcessor = await initializeBackgroundReplacement();
try {
const logger =
options?.logger ||
new ConsoleLogger('BackgroundReplacementProvider', LogLevel.INFO);
const optionsLogger = options?.logger || logger;
if (currentProcessor) {
const chosenVideoTransformDevice = new DefaultVideoTransformDevice(
logger,
optionsLogger,
selectedDevice,
[currentProcessor]
);
Expand Down

0 comments on commit 74b62db

Please sign in to comment.