Skip to content

Commit a162509

Browse files
committed
feat: Migrate logger to js-toolkit logger implementation
- update @stream-io/loggers package - add @stream-io/loggers as seperate package in react-native-sdk and
1 parent ffb45ac commit a162509

File tree

55 files changed

+73
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+73
-74
lines changed

packages/client/src/Call.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
createSubscription,
2626
getCurrentValue,
2727
} from './store/rxUtils';
28+
import type { ScopedLogger } from './logger';
2829
import type {
2930
AcceptCallResponse,
3031
BlockUserRequest,
@@ -140,7 +141,7 @@ import {
140141
StreamCallEvent,
141142
} from './coordinator/connection/types';
142143
import { getClientDetails } from './helpers/client-details';
143-
import { getLogger, ScopedLogger } from './logger';
144+
import { getLogger } from '@stream-io/logger';
144145
import {
145146
CameraManager,
146147
MicrophoneManager,

packages/client/src/StreamSfuClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { ICETrickle } from './gen/video/sfu/models/models';
2929
import { StreamClient } from './coordinator/connection/client';
3030
import { generateUUIDv4 } from './coordinator/connection/utils';
3131
import { Credentials } from './gen/coordinator';
32-
import { getLogger, ScopedLogger } from './logger';
32+
import { ScopedLogger } from './logger';
3333
import {
3434
makeSafePromise,
3535
PromiseWithResolvers,
@@ -38,6 +38,7 @@ import {
3838
} from './helpers/promise';
3939
import { getTimers } from './timers';
4040
import { Tracer, TraceSlice } from './stats';
41+
import { getLogger } from '@stream-io/logger';
4142

4243
export type StreamSfuClientConstructor = {
4344
/**

packages/client/src/StreamVideoClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ import {
3737
getCallInitConcurrencyTag,
3838
getInstanceKey,
3939
} from './helpers/clientUtils';
40-
import { getLogger, logToConsole, ScopedLogger, setLogger } from './logger';
40+
import { logToConsole, ScopedLogger, setLogger } from './logger';
4141
import { withoutConcurrency } from './helpers/concurrency';
4242
import { enableTimerWorker } from './timers';
43+
import { getLogger } from '@stream-io/logger';
4344

4445
export type StreamVideoClientOptions = {
4546
apiKey: string;

packages/client/src/coordinator/connection/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ import {
3636
CreateGuestResponse,
3737
} from '../../gen/coordinator';
3838
import { makeSafePromise, type SafePromise } from '../../helpers/promise';
39-
import { getLogger, ScopedLogger } from '../../logger';
39+
import { ScopedLogger } from '../../logger';
40+
import { getLogger } from '@stream-io/logger';
4041

4142
export class StreamClient {
4243
_user?: UserWithId;

packages/client/src/coordinator/connection/location.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getLogger } from '../../logger';
1+
import { getLogger } from '@stream-io/logger';
22

33
export const getLocationHint = async (
44
hintUrl = `https://hint.stream-io-video.com/`,

packages/client/src/devices/BrowserPermission.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { fromEventPattern, map } from 'rxjs';
22
import { isReactNative } from '../helpers/platforms';
3-
import { getLogger } from '../logger';
3+
import { getLogger } from '@stream-io/logger';
44
import { disposeOfMediaStream } from './utils';
55
import { withoutConcurrency } from '../helpers/concurrency';
66

packages/client/src/devices/DeviceManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { createSubscription } from '../store/rxUtils';
66
import { DeviceManagerState } from './DeviceManagerState';
77
import { isMobile } from '../helpers/compatibility';
88
import { isReactNative } from '../helpers/platforms';
9-
import { getLogger, ScopedLogger } from '../logger';
9+
import { getLogger } from '@stream-io/logger';
10+
import { ScopedLogger } from '../logger';
1011
import { TrackType } from '../gen/video/sfu/models/models';
1112
import { deviceIds$ } from './devices';
1213
import {
@@ -256,6 +257,7 @@ export abstract class DeviceManager<
256257
};
257258

258259
protected async applySettingsToStream() {
260+
console.log('applySettingsToStream ');
259261
await withCancellation(this.statusChangeConcurrencyTag, async (signal) => {
260262
if (this.enabled) {
261263
try {

packages/client/src/devices/devices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
startWith,
1010
tap,
1111
} from 'rxjs';
12-
import { getLogger } from '../logger';
12+
import { getLogger } from '@stream-io/logger';
1313
import { BrowserPermission } from './BrowserPermission';
1414
import { lazy } from '../helpers/lazy';
1515
import { isFirefox } from '../helpers/browsers';

packages/client/src/events/internal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Dispatcher } from '../rtc';
22
import { Call } from '../Call';
33
import { CallState } from '../store';
44
import { StreamVideoParticipantPatches } from '../types';
5-
import { getLogger } from '../logger';
5+
import { getLogger } from '@stream-io/logger';
66
import { pushToIfMissing, removeFromIfPresent } from '../helpers/array';
77
import type {
88
InboundStateNotification,

packages/client/src/helpers/DynascaleManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
takeWhile,
1616
} from 'rxjs';
1717
import { ViewportTracker } from './ViewportTracker';
18-
import { getLogger } from '../logger';
18+
import { getLogger } from '@stream-io/logger';
1919
import { isFirefox, isSafari } from './browsers';
2020
import {
2121
hasScreenShare,

0 commit comments

Comments
 (0)