Selaa lähdekoodia

rn: add native loggers

These provide the ability to integrate the SDK with some other application
loggers.

At the time this was written we use Timber on Android and CocoaLumberjack on iOS.

In addition to the integration capabilities, a LogBridge React Native module
provides log transports for JavaScript code, thus centralizing all logs on the
native loggers.
master
Saúl Ibarra Corretgé 5 vuotta sitten
vanhempi
commit
902da8cc4f
41 muutettua tiedostoa jossa 932 lisäystä ja 190 poistoa
  1. 1
    0
      android/sdk/build.gradle
  2. 2
    1
      android/sdk/src/main/java/org/jitsi/meet/sdk/AmplitudeModule.java
  3. 17
    20
      android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java
  4. 6
    9
      android/sdk/src/main/java/org/jitsi/meet/sdk/BluetoothHeadsetMonitor.java
  5. 20
    30
      android/sdk/src/main/java/org/jitsi/meet/sdk/ConnectionService.java
  6. 4
    4
      android/sdk/src/main/java/org/jitsi/meet/sdk/ExternalAPIModule.java
  7. 5
    4
      android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java
  8. 8
    7
      android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetOngoingConferenceService.java
  9. 2
    2
      android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetUncaughtExceptionHandler.java
  10. 3
    8
      android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java
  11. 73
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/LogBridgeModule.java
  12. 4
    3
      android/sdk/src/main/java/org/jitsi/meet/sdk/OngoingNotification.java
  13. 3
    2
      android/sdk/src/main/java/org/jitsi/meet/sdk/PictureInPictureModule.java
  14. 8
    7
      android/sdk/src/main/java/org/jitsi/meet/sdk/RNConnectionService.java
  15. 2
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java
  16. 4
    6
      android/sdk/src/main/java/org/jitsi/meet/sdk/WiFiStatsModule.java
  17. 49
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/log/JitsiMeetBaseLogHandler.java
  18. 39
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/log/JitsiMeetDefaultLogHandler.java
  19. 94
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/log/JitsiMeetLogger.java
  20. 4
    4
      android/sdk/src/main/java/org/jitsi/meet/sdk/net/NAT64AddrInfoModule.java
  21. 1
    0
      ios/Podfile
  22. 8
    2
      ios/Podfile.lock
  23. 32
    4
      ios/sdk/sdk.xcodeproj/project.pbxproj
  24. 5
    3
      ios/sdk/src/AudioMode.m
  25. 2
    0
      ios/sdk/src/JitsiMeet.h
  26. 24
    0
      ios/sdk/src/JitsiMeetBaseLogHandler+Private.h
  27. 28
    0
      ios/sdk/src/JitsiMeetBaseLogHandler.h
  28. 105
    0
      ios/sdk/src/JitsiMeetBaseLogHandler.m
  29. 27
    0
      ios/sdk/src/JitsiMeetLogger.h
  30. 40
    0
      ios/sdk/src/JitsiMeetLogger.m
  31. 57
    0
      ios/sdk/src/LogBridge.m
  32. 23
    0
      ios/sdk/src/LogUtils.h
  33. 4
    2
      ios/sdk/src/analytics/AmplitudeModule.m
  34. 22
    54
      ios/sdk/src/callkit/CallKit.m
  35. 111
    11
      package-lock.json
  36. 1
    0
      package.json
  37. 65
    0
      react/features/base/logging/LogTransport.native.js
  38. 0
    0
      react/features/base/logging/LogTransport.web.js
  39. 23
    1
      react/features/base/logging/functions.js
  40. 0
    6
      react/features/base/logging/middleware.js
  41. 6
    0
      react/index.native.js

+ 1
- 0
android/sdk/build.gradle Näytä tiedosto

44
     implementation 'org.webkit:android-jsc:+'
44
     implementation 'org.webkit:android-jsc:+'
45
 
45
 
46
     implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
46
     implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
47
+    implementation 'com.jakewharton.timber:timber:4.7.1'
47
 
48
 
48
     if (!rootProject.ext.libreBuild) {
49
     if (!rootProject.ext.libreBuild) {
49
         implementation 'com.amplitude:android-sdk:2.14.1'
50
         implementation 'com.amplitude:android-sdk:2.14.1'

+ 2
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/AmplitudeModule.java Näytä tiedosto

24
 import com.amplitude.api.Amplitude;
24
 import com.amplitude.api.Amplitude;
25
 import com.facebook.react.module.annotations.ReactModule;
25
 import com.facebook.react.module.annotations.ReactModule;
26
 
26
 
27
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
27
 import org.json.JSONException;
28
 import org.json.JSONException;
28
 import org.json.JSONObject;
29
 import org.json.JSONObject;
29
 
30
 
90
             JSONObject eventProps = new JSONObject(eventPropsString);
91
             JSONObject eventProps = new JSONObject(eventPropsString);
91
             Amplitude.getInstance(instanceName).logEvent(eventType, eventProps);
92
             Amplitude.getInstance(instanceName).logEvent(eventType, eventProps);
92
         } catch (JSONException e) {
93
         } catch (JSONException e) {
93
-            e.printStackTrace();
94
+            JitsiMeetLogger.e(e, "Error logging event");
94
         }
95
         }
95
     }
96
     }
96
 
97
 

+ 17
- 20
android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java Näytä tiedosto

25
 import android.media.AudioDeviceInfo;
25
 import android.media.AudioDeviceInfo;
26
 import android.media.AudioManager;
26
 import android.media.AudioManager;
27
 import android.os.Build;
27
 import android.os.Build;
28
-import android.util.Log;
29
 import androidx.annotation.RequiresApi;
28
 import androidx.annotation.RequiresApi;
30
 
29
 
31
 import com.facebook.react.bridge.Arguments;
30
 import com.facebook.react.bridge.Arguments;
37
 import com.facebook.react.bridge.WritableMap;
36
 import com.facebook.react.bridge.WritableMap;
38
 import com.facebook.react.module.annotations.ReactModule;
37
 import com.facebook.react.module.annotations.ReactModule;
39
 
38
 
39
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
40
+
40
 import java.util.HashMap;
41
 import java.util.HashMap;
41
 import java.util.HashSet;
42
 import java.util.HashSet;
42
 import java.util.Map;
43
 import java.util.Map;
121
             case DEVICE_SPEAKER:
122
             case DEVICE_SPEAKER:
122
                 return android.telecom.CallAudioState.ROUTE_SPEAKER;
123
                 return android.telecom.CallAudioState.ROUTE_SPEAKER;
123
             default:
124
             default:
124
-                Log.e(TAG, "Unsupported device name: " + audioDevice);
125
+                JitsiMeetLogger.e(TAG + " Unsupported device name: " + audioDevice);
125
                 return android.telecom.CallAudioState.ROUTE_EARPIECE;
126
                 return android.telecom.CallAudioState.ROUTE_EARPIECE;
126
         }
127
         }
127
     }
128
     }
218
             }
219
             }
219
 
220
 
220
             availableDevices = devices;
221
             availableDevices = devices;
221
-            Log.d(TAG, "Available audio devices: " +
222
+            JitsiMeetLogger.i(TAG + " Available audio devices: " +
222
                 availableDevices.toString());
223
                 availableDevices.toString());
223
 
224
 
224
             // Reset user selection
225
             // Reset user selection
360
                     data.pushMap(deviceInfo);
361
                     data.pushMap(deviceInfo);
361
                 }
362
                 }
362
                 ReactInstanceManagerHolder.emitEvent(DEVICE_CHANGE_EVENT, data);
363
                 ReactInstanceManagerHolder.emitEvent(DEVICE_CHANGE_EVENT, data);
363
-                Log.i(TAG, "Updating audio device list");
364
+                JitsiMeetLogger.i(TAG + " Updating audio device list");
364
             }
365
             }
365
         });
366
         });
366
     }
367
     }
443
                 if (audioDevicesChanged) {
444
                 if (audioDevicesChanged) {
444
                     supportedRouteMask = newSupportedRoutes;
445
                     supportedRouteMask = newSupportedRoutes;
445
                     availableDevices = routesToDeviceNames(supportedRouteMask);
446
                     availableDevices = routesToDeviceNames(supportedRouteMask);
446
-                    Log.d(TAG,
447
-                          "Available audio devices: "
447
+                    JitsiMeetLogger.i(TAG + " Available audio devices: "
448
                                   + availableDevices.toString());
448
                                   + availableDevices.toString());
449
                 }
449
                 }
450
 
450
 
478
     public void onAudioFocusChange(int focusChange) {
478
     public void onAudioFocusChange(int focusChange) {
479
         switch (focusChange) {
479
         switch (focusChange) {
480
         case AudioManager.AUDIOFOCUS_GAIN: {
480
         case AudioManager.AUDIOFOCUS_GAIN: {
481
-            Log.d(TAG, "Audio focus gained");
481
+            JitsiMeetLogger.d(TAG + " Audio focus gained");
482
             // Some other application potentially stole our audio focus
482
             // Some other application potentially stole our audio focus
483
             // temporarily. Restore our mode.
483
             // temporarily. Restore our mode.
484
             if (audioFocusLost) {
484
             if (audioFocusLost) {
490
         case AudioManager.AUDIOFOCUS_LOSS:
490
         case AudioManager.AUDIOFOCUS_LOSS:
491
         case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
491
         case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
492
         case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK: {
492
         case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK: {
493
-            Log.d(TAG, "Audio focus lost");
493
+            JitsiMeetLogger.d(TAG + " Audio focus lost");
494
             audioFocusLost = true;
494
             audioFocusLost = true;
495
             break;
495
             break;
496
         }
496
         }
517
             @Override
517
             @Override
518
             public void run() {
518
             public void run() {
519
                 if (!availableDevices.contains(device)) {
519
                 if (!availableDevices.contains(device)) {
520
-                    Log.d(TAG, "Audio device not available: " + device);
520
+                    JitsiMeetLogger.w(TAG + " Audio device not available: " + device);
521
                     userSelectedDevice = null;
521
                     userSelectedDevice = null;
522
                     return;
522
                     return;
523
                 }
523
                 }
524
 
524
 
525
                 if (mode != -1) {
525
                 if (mode != -1) {
526
-                    Log.d(TAG, "User selected device set to: " + device);
526
+                    JitsiMeetLogger.i(TAG + " User selected device set to: " + device);
527
                     userSelectedDevice = device;
527
                     userSelectedDevice = device;
528
                     updateAudioRoute(mode);
528
                     updateAudioRoute(mode);
529
                 }
529
                 }
594
                     success = updateAudioRoute(mode);
594
                     success = updateAudioRoute(mode);
595
                 } catch (Throwable e) {
595
                 } catch (Throwable e) {
596
                     success = false;
596
                     success = false;
597
-                    Log.e(
598
-                            TAG,
599
-                            "Failed to update audio route for mode: " + mode,
600
-                            e);
597
+                    JitsiMeetLogger.e(e, TAG + " Failed to update audio route for mode: " + mode);
601
                 }
598
                 }
602
                 if (success) {
599
                 if (success) {
603
                     AudioModeModule.this.mode = mode;
600
                     AudioModeModule.this.mode = mode;
633
                     @Override
630
                     @Override
634
                     public void onAudioDevicesAdded(
631
                     public void onAudioDevicesAdded(
635
                             AudioDeviceInfo[] addedDevices) {
632
                             AudioDeviceInfo[] addedDevices) {
636
-                        Log.d(TAG, "Audio devices added");
633
+                        JitsiMeetLogger.d(TAG + " Audio devices added");
637
                         onAudioDeviceChange();
634
                         onAudioDeviceChange();
638
                     }
635
                     }
639
 
636
 
640
                     @Override
637
                     @Override
641
                     public void onAudioDevicesRemoved(
638
                     public void onAudioDevicesRemoved(
642
                             AudioDeviceInfo[] removedDevices) {
639
                             AudioDeviceInfo[] removedDevices) {
643
-                        Log.d(TAG, "Audio devices removed");
640
+                        JitsiMeetLogger.d(TAG + " Audio devices removed");
644
                         onAudioDeviceChange();
641
                         onAudioDeviceChange();
645
                     }
642
                     }
646
                 };
643
                 };
659
         BroadcastReceiver wiredHeadsetReceiver = new BroadcastReceiver() {
656
         BroadcastReceiver wiredHeadsetReceiver = new BroadcastReceiver() {
660
             @Override
657
             @Override
661
             public void onReceive(Context context, Intent intent) {
658
             public void onReceive(Context context, Intent intent) {
662
-                Log.d(TAG, "Wired headset added / removed");
659
+                JitsiMeetLogger.d(TAG + " Wired headset added / removed");
663
                 onHeadsetDeviceChange();
660
                 onHeadsetDeviceChange();
664
             }
661
             }
665
         };
662
         };
677
      * {@code false}, otherwise.
674
      * {@code false}, otherwise.
678
      */
675
      */
679
     private boolean updateAudioRoute(int mode) {
676
     private boolean updateAudioRoute(int mode) {
680
-        Log.d(TAG, "Update audio route for mode: " + mode);
677
+        JitsiMeetLogger.i(TAG + " Update audio route for mode: " + mode);
681
 
678
 
682
         if (mode == DEFAULT) {
679
         if (mode == DEFAULT) {
683
             if (!useConnectionService()) {
680
             if (!useConnectionService()) {
703
                     AudioManager.STREAM_VOICE_CALL,
700
                     AudioManager.STREAM_VOICE_CALL,
704
                     AudioManager.AUDIOFOCUS_GAIN)
701
                     AudioManager.AUDIOFOCUS_GAIN)
705
                     == AudioManager.AUDIOFOCUS_REQUEST_FAILED) {
702
                     == AudioManager.AUDIOFOCUS_REQUEST_FAILED) {
706
-                Log.d(TAG, "Audio focus request failed");
703
+                JitsiMeetLogger.w(TAG + " Audio focus request failed");
707
                 return false;
704
                 return false;
708
             }
705
             }
709
         }
706
         }
734
         }
731
         }
735
 
732
 
736
         selectedDevice = audioDevice;
733
         selectedDevice = audioDevice;
737
-        Log.d(TAG, "Selected audio device: " + audioDevice);
734
+        JitsiMeetLogger.i(TAG + " Selected audio device: " + audioDevice);
738
 
735
 
739
         if (useConnectionService()) {
736
         if (useConnectionService()) {
740
             setAudioRoute(audioDevice);
737
             setAudioRoute(audioDevice);

+ 6
- 9
android/sdk/src/main/java/org/jitsi/meet/sdk/BluetoothHeadsetMonitor.java Näytä tiedosto

24
 import android.content.Intent;
24
 import android.content.Intent;
25
 import android.content.IntentFilter;
25
 import android.content.IntentFilter;
26
 import android.media.AudioManager;
26
 import android.media.AudioManager;
27
-import android.util.Log;
27
+
28
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
28
 
29
 
29
 /**
30
 /**
30
  * Helper class to detect and handle Bluetooth device changes.  It monitors
31
  * Helper class to detect and handle Bluetooth device changes.  It monitors
77
             = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
78
             = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
78
 
79
 
79
         if (!audioManager.isBluetoothScoAvailableOffCall()) {
80
         if (!audioManager.isBluetoothScoAvailableOffCall()) {
80
-            Log.w(AudioModeModule.TAG, "Bluetooth SCO is not available");
81
+            JitsiMeetLogger.w(AudioModeModule.TAG + " Bluetooth SCO is not available");
81
             return;
82
             return;
82
         }
83
         }
83
 
84
 
93
         BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
94
         BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
94
 
95
 
95
         if (adapter == null) {
96
         if (adapter == null) {
96
-            Log.w(AudioModeModule.TAG, "Device doesn't support Bluetooth");
97
+            JitsiMeetLogger.w(AudioModeModule.TAG + " Device doesn't support Bluetooth");
97
             return false;
98
             return false;
98
         }
99
         }
99
 
100
 
148
             switch (state) {
149
             switch (state) {
149
             case BluetoothHeadset.STATE_CONNECTED:
150
             case BluetoothHeadset.STATE_CONNECTED:
150
             case BluetoothHeadset.STATE_DISCONNECTED:
151
             case BluetoothHeadset.STATE_DISCONNECTED:
151
-                Log.d(
152
-                        AudioModeModule.TAG,
153
-                        "BT headset connection state changed: " + state);
152
+                JitsiMeetLogger.d(AudioModeModule.TAG + " BT headset connection state changed: " + state);
154
                 updateDevices();
153
                 updateDevices();
155
                 break;
154
                 break;
156
             }
155
             }
164
             switch (state) {
163
             switch (state) {
165
             case AudioManager.SCO_AUDIO_STATE_CONNECTED:
164
             case AudioManager.SCO_AUDIO_STATE_CONNECTED:
166
             case AudioManager.SCO_AUDIO_STATE_DISCONNECTED:
165
             case AudioManager.SCO_AUDIO_STATE_DISCONNECTED:
167
-                Log.d(
168
-                        AudioModeModule.TAG,
169
-                        "BT SCO connection state changed: " + state);
166
+                JitsiMeetLogger.d(AudioModeModule.TAG + " BT SCO connection state changed: " + state);
170
                 updateDevices();
167
                 updateDevices();
171
                 break;
168
                 break;
172
             }
169
             }

+ 20
- 30
android/sdk/src/main/java/org/jitsi/meet/sdk/ConnectionService.java Näytä tiedosto

13
 import android.telecom.PhoneAccountHandle;
13
 import android.telecom.PhoneAccountHandle;
14
 import android.telecom.TelecomManager;
14
 import android.telecom.TelecomManager;
15
 import android.telecom.VideoProfile;
15
 import android.telecom.VideoProfile;
16
-import android.util.Log;
17
 import androidx.annotation.RequiresApi;
16
 import androidx.annotation.RequiresApi;
18
 
17
 
19
 import com.facebook.react.bridge.Promise;
18
 import com.facebook.react.bridge.Promise;
20
 import com.facebook.react.bridge.ReadableMap;
19
 import com.facebook.react.bridge.ReadableMap;
21
 import com.facebook.react.bridge.WritableNativeMap;
20
 import com.facebook.react.bridge.WritableNativeMap;
22
 
21
 
22
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
23
+
23
 import java.util.ArrayList;
24
 import java.util.ArrayList;
24
 import java.util.HashMap;
25
 import java.util.HashMap;
25
 import java.util.List;
26
 import java.util.List;
129
         if (connection != null) {
130
         if (connection != null) {
130
             connection.setActive();
131
             connection.setActive();
131
         } else {
132
         } else {
132
-            Log.e(TAG, String.format(
133
-                    "setConnectionActive - no connection for UUID: %s",
134
-                    callUUID));
133
+            JitsiMeetLogger.e("% setConnectionActive - no connection for UUID: %s", TAG, callUUID);
135
         }
134
         }
136
     }
135
     }
137
 
136
 
162
             connection.setDisconnected(cause);
161
             connection.setDisconnected(cause);
163
             connection.destroy();
162
             connection.destroy();
164
         } else {
163
         } else {
165
-            Log.e(TAG, "endCall no connection for UUID: " + callUUID);
164
+            JitsiMeetLogger.e(TAG + " endCall no connection for UUID: " + callUUID);
166
         }
165
         }
167
     }
166
     }
168
 
167
 
194
                 boolean hasVideo
193
                 boolean hasVideo
195
                         = callState.getBoolean(ConnectionImpl.KEY_HAS_VIDEO);
194
                         = callState.getBoolean(ConnectionImpl.KEY_HAS_VIDEO);
196
 
195
 
197
-                Log.d(TAG, String.format(
198
-                        "updateCall: %s hasVideo: %s", callUUID, hasVideo));
196
+                JitsiMeetLogger.i(" %s updateCall: %s hasVideo: %s", TAG, callUUID, hasVideo);
199
                 connection.setVideoState(
197
                 connection.setVideoState(
200
                         hasVideo
198
                         hasVideo
201
                                 ? VideoProfile.STATE_BIDIRECTIONAL
199
                                 ? VideoProfile.STATE_BIDIRECTIONAL
202
                                 : VideoProfile.STATE_AUDIO_ONLY);
200
                                 : VideoProfile.STATE_AUDIO_ONLY);
203
             }
201
             }
204
         } else {
202
         } else {
205
-            Log.e(TAG, "updateCall no connection for UUID: " + callUUID);
203
+            JitsiMeetLogger.e(TAG +     " updateCall no connection for UUID: " + callUUID);
206
         }
204
         }
207
     }
205
     }
208
 
206
 
238
             = unregisterStartCallPromise(connection.getCallUUID());
236
             = unregisterStartCallPromise(connection.getCallUUID());
239
 
237
 
240
         if (startCallPromise != null) {
238
         if (startCallPromise != null) {
241
-            Log.d(TAG,
242
-                  "onCreateOutgoingConnection " + connection.getCallUUID());
239
+            JitsiMeetLogger.d(TAG + " onCreateOutgoingConnection " + connection.getCallUUID());
243
             startCallPromise.resolve(null);
240
             startCallPromise.resolve(null);
244
         } else {
241
         } else {
245
-            Log.e(TAG, String.format(
246
-                "onCreateOutgoingConnection: no start call Promise for %s",
247
-                connection.getCallUUID()));
242
+            JitsiMeetLogger.e(
243
+                TAG + " onCreateOutgoingConnection: no start call Promise for " + connection.getCallUUID());
248
         }
244
         }
249
 
245
 
250
         return connection;
246
         return connection;
268
         PhoneAccountHandle theAccountHandle = request.getAccountHandle();
264
         PhoneAccountHandle theAccountHandle = request.getAccountHandle();
269
         String callUUID = theAccountHandle.getId();
265
         String callUUID = theAccountHandle.getId();
270
 
266
 
271
-        Log.e(TAG, "onCreateOutgoingConnectionFailed " + callUUID);
267
+        JitsiMeetLogger.e(TAG + " onCreateOutgoingConnectionFailed " + callUUID);
272
 
268
 
273
         if (callUUID != null) {
269
         if (callUUID != null) {
274
             Promise startCallPromise = unregisterStartCallPromise(callUUID);
270
             Promise startCallPromise = unregisterStartCallPromise(callUUID);
278
                         "CREATE_OUTGOING_CALL_FAILED",
274
                         "CREATE_OUTGOING_CALL_FAILED",
279
                         "The request has been denied by the system");
275
                         "The request has been denied by the system");
280
             } else {
276
             } else {
281
-                Log.e(TAG, String.format(
282
-                        "startCallFailed - no start call Promise for UUID: %s",
283
-                        callUUID));
277
+                JitsiMeetLogger.e(TAG + " startCallFailed - no start call Promise for UUID: " + callUUID);
284
             }
278
             }
285
         } else {
279
         } else {
286
-            Log.e(TAG, "onCreateOutgoingConnectionFailed - no call UUID");
280
+            JitsiMeetLogger.e(TAG + " onCreateOutgoingConnectionFailed - no call UUID");
287
         }
281
         }
288
 
282
 
289
         unregisterPhoneAccount(theAccountHandle);
283
         unregisterPhoneAccount(theAccountHandle);
295
             if (phoneAccountHandle != null) {
289
             if (phoneAccountHandle != null) {
296
                 telecom.unregisterPhoneAccount(phoneAccountHandle);
290
                 telecom.unregisterPhoneAccount(phoneAccountHandle);
297
             } else {
291
             } else {
298
-                Log.e(TAG, "unregisterPhoneAccount - account handle is null");
292
+                JitsiMeetLogger.e(TAG + " unregisterPhoneAccount - account handle is null");
299
             }
293
             }
300
         } else {
294
         } else {
301
-            Log.e(TAG, "unregisterPhoneAccount - telecom is null");
295
+            JitsiMeetLogger.e(TAG + "unregisterPhoneAccount - telecom is null");
302
         }
296
         }
303
     }
297
     }
304
 
298
 
357
          */
351
          */
358
         @Override
352
         @Override
359
         public void onDisconnect() {
353
         public void onDisconnect() {
360
-            Log.d(TAG, "onDisconnect " + getCallUUID());
354
+            JitsiMeetLogger.i(TAG + " onDisconnect " + getCallUUID());
361
             WritableNativeMap data = new WritableNativeMap();
355
             WritableNativeMap data = new WritableNativeMap();
362
             data.putString("callUUID", getCallUUID());
356
             data.putString("callUUID", getCallUUID());
363
             ReactInstanceManagerHolder.emitEvent(
357
             ReactInstanceManagerHolder.emitEvent(
377
          */
371
          */
378
         @Override
372
         @Override
379
         public void onAbort() {
373
         public void onAbort() {
380
-            Log.d(TAG, "onAbort " + getCallUUID());
374
+            JitsiMeetLogger.i(TAG + " onAbort " + getCallUUID());
381
             WritableNativeMap data = new WritableNativeMap();
375
             WritableNativeMap data = new WritableNativeMap();
382
             data.putString("callUUID", getCallUUID());
376
             data.putString("callUUID", getCallUUID());
383
             ReactInstanceManagerHolder.emitEvent(
377
             ReactInstanceManagerHolder.emitEvent(
395
             // What ?! Android will still call this method even if we do not add
389
             // What ?! Android will still call this method even if we do not add
396
             // the HOLD capability, so do the same thing as on abort.
390
             // the HOLD capability, so do the same thing as on abort.
397
             // TODO implement HOLD
391
             // TODO implement HOLD
398
-            Log.d(TAG, String.format(
399
-                  "onHold %s - HOLD is not supported, aborting the call...",
400
-                  getCallUUID()));
392
+            JitsiMeetLogger.w(TAG + " onHold %s - HOLD is not supported, aborting the call...", getCallUUID());
401
             this.onAbort();
393
             this.onAbort();
402
         }
394
         }
403
 
395
 
410
          */
402
          */
411
         @Override
403
         @Override
412
         public void onCallAudioStateChanged(CallAudioState state) {
404
         public void onCallAudioStateChanged(CallAudioState state) {
413
-            Log.d(TAG, "onCallAudioStateChanged: " + state);
405
+            JitsiMeetLogger.d(TAG + " onCallAudioStateChanged: " + state);
414
             AudioModeModule audioModeModule
406
             AudioModeModule audioModeModule
415
                     = ReactInstanceManagerHolder
407
                     = ReactInstanceManagerHolder
416
                     .getNativeModule(AudioModeModule.class);
408
                     .getNativeModule(AudioModeModule.class);
426
          */
418
          */
427
         @Override
419
         @Override
428
         public void onStateChanged(int state) {
420
         public void onStateChanged(int state) {
429
-            Log.d(TAG,
430
-                  String.format("onStateChanged: %s %s",
431
-                                Connection.stateToString(state),
432
-                                getCallUUID()));
421
+            JitsiMeetLogger.d(
422
+                "%s onStateChanged: %s %s", TAG, Connection.stateToString(state), getCallUUID());
433
 
423
 
434
             if (state == STATE_DISCONNECTED) {
424
             if (state == STATE_DISCONNECTED) {
435
                 removeConnection(this);
425
                 removeConnection(this);

+ 4
- 4
android/sdk/src/main/java/org/jitsi/meet/sdk/ExternalAPIModule.java Näytä tiedosto

16
 
16
 
17
 package org.jitsi.meet.sdk;
17
 package org.jitsi.meet.sdk;
18
 
18
 
19
-import android.util.Log;
20
-
21
 import com.facebook.react.bridge.ReactApplicationContext;
19
 import com.facebook.react.bridge.ReactApplicationContext;
22
 import com.facebook.react.bridge.ReactContextBaseJavaModule;
20
 import com.facebook.react.bridge.ReactContextBaseJavaModule;
23
 import com.facebook.react.bridge.ReactMethod;
21
 import com.facebook.react.bridge.ReactMethod;
24
 import com.facebook.react.bridge.ReadableMap;
22
 import com.facebook.react.bridge.ReadableMap;
25
 import com.facebook.react.module.annotations.ReactModule;
23
 import com.facebook.react.module.annotations.ReactModule;
26
 
24
 
25
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
26
+
27
 /**
27
 /**
28
  * Module implementing an API for sending events from JavaScript to native code.
28
  * Module implementing an API for sending events from JavaScript to native code.
29
  */
29
  */
76
         BaseReactView view = BaseReactView.findViewByExternalAPIScope(scope);
76
         BaseReactView view = BaseReactView.findViewByExternalAPIScope(scope);
77
 
77
 
78
         if (view != null) {
78
         if (view != null) {
79
-            Log.d(TAG, "Sending event: " + name + " with data: " + data);
79
+            JitsiMeetLogger.d(TAG + " Sending event: " + name + " with data: " + data);
80
             try {
80
             try {
81
                 view.onExternalAPIEvent(name, data);
81
                 view.onExternalAPIEvent(name, data);
82
             } catch(Exception e) {
82
             } catch(Exception e) {
83
-                Log.e(TAG, "onExternalAPIEvent: error sending event", e);
83
+                JitsiMeetLogger.e(e, TAG + " onExternalAPIEvent: error sending event");
84
             }
84
             }
85
         }
85
         }
86
     }
86
     }

+ 5
- 4
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java Näytä tiedosto

20
 import android.content.Intent;
20
 import android.content.Intent;
21
 import android.net.Uri;
21
 import android.net.Uri;
22
 import android.os.Bundle;
22
 import android.os.Bundle;
23
-import android.util.Log;
24
 import androidx.annotation.Nullable;
23
 import androidx.annotation.Nullable;
25
 import androidx.fragment.app.FragmentActivity;
24
 import androidx.fragment.app.FragmentActivity;
26
 
25
 
27
 import com.facebook.react.modules.core.PermissionListener;
26
 import com.facebook.react.modules.core.PermissionListener;
28
 
27
 
28
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
29
+
29
 import java.util.Map;
30
 import java.util.Map;
30
 
31
 
31
 
32
 
208
 
209
 
209
     @Override
210
     @Override
210
     public void onConferenceJoined(Map<String, Object> data) {
211
     public void onConferenceJoined(Map<String, Object> data) {
211
-        Log.d(TAG, "Conference joined: " + data);
212
+        JitsiMeetLogger.i("Conference joined: " + data);
212
         // Launch the service for the ongoing notification.
213
         // Launch the service for the ongoing notification.
213
         JitsiMeetOngoingConferenceService.launch(this);
214
         JitsiMeetOngoingConferenceService.launch(this);
214
     }
215
     }
215
 
216
 
216
     @Override
217
     @Override
217
     public void onConferenceTerminated(Map<String, Object> data) {
218
     public void onConferenceTerminated(Map<String, Object> data) {
218
-        Log.d(TAG, "Conference terminated: " + data);
219
+        JitsiMeetLogger.i("Conference terminated: " + data);
219
         finish();
220
         finish();
220
     }
221
     }
221
 
222
 
222
     @Override
223
     @Override
223
     public void onConferenceWillJoin(Map<String, Object> data) {
224
     public void onConferenceWillJoin(Map<String, Object> data) {
224
-        Log.d(TAG, "Conference will join: " + data);
225
+        JitsiMeetLogger.i("Conference will join: " + data);
225
     }
226
     }
226
 }
227
 }

+ 8
- 7
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetOngoingConferenceService.java Näytä tiedosto

23
 import android.content.Intent;
23
 import android.content.Intent;
24
 import android.os.Build;
24
 import android.os.Build;
25
 import android.os.IBinder;
25
 import android.os.IBinder;
26
-import android.util.Log;
26
+
27
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
27
 
28
 
28
 
29
 
29
 /**
30
 /**
55
             componentName = context.startService(intent);
56
             componentName = context.startService(intent);
56
         }
57
         }
57
         if (componentName == null) {
58
         if (componentName == null) {
58
-            Log.w(TAG, "Ongoing conference service not started");
59
+            JitsiMeetLogger.w(TAG + " Ongoing conference service not started");
59
         }
60
         }
60
     }
61
     }
61
 
62
 
90
             Notification notification = OngoingNotification.buildOngoingConferenceNotification();
91
             Notification notification = OngoingNotification.buildOngoingConferenceNotification();
91
             if (notification == null) {
92
             if (notification == null) {
92
                 stopSelf();
93
                 stopSelf();
93
-                Log.w(TAG, "Couldn't start service, notification is null");
94
+                JitsiMeetLogger.w(TAG + " Couldn't start service, notification is null");
94
             } else {
95
             } else {
95
                 startForeground(OngoingNotification.NOTIFICATION_ID, notification);
96
                 startForeground(OngoingNotification.NOTIFICATION_ID, notification);
96
-                Log.i(TAG, "Service started");
97
+                JitsiMeetLogger.i(TAG + " Service started");
97
             }
98
             }
98
         } else if (action.equals(Actions.HANGUP)) {
99
         } else if (action.equals(Actions.HANGUP)) {
99
-            Log.i(TAG, "Hangup requested");
100
+            JitsiMeetLogger.i(TAG + " Hangup requested");
100
             // Abort all ongoing calls
101
             // Abort all ongoing calls
101
             if (AudioModeModule.useConnectionService()) {
102
             if (AudioModeModule.useConnectionService()) {
102
                 ConnectionService.abortConnections();
103
                 ConnectionService.abortConnections();
103
             }
104
             }
104
             stopSelf();
105
             stopSelf();
105
         } else {
106
         } else {
106
-            Log.w(TAG, "Unknown action received: " + action);
107
+            JitsiMeetLogger.w(TAG + " Unknown action received: " + action);
107
             stopSelf();
108
             stopSelf();
108
         }
109
         }
109
 
110
 
114
     public void onCurrentConferenceChanged(String conferenceUrl) {
115
     public void onCurrentConferenceChanged(String conferenceUrl) {
115
         if (conferenceUrl == null) {
116
         if (conferenceUrl == null) {
116
             stopSelf();
117
             stopSelf();
117
-            Log.i(TAG, "Service stopped");
118
+            JitsiMeetLogger.i(TAG + "Service stopped");
118
         }
119
         }
119
     }
120
     }
120
 }
121
 }

+ 2
- 2
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetUncaughtExceptionHandler.java Näytä tiedosto

17
 
17
 
18
 package org.jitsi.meet.sdk;
18
 package org.jitsi.meet.sdk;
19
 
19
 
20
-import android.util.Log;
20
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
21
 
21
 
22
 class JitsiMeetUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
22
 class JitsiMeetUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
23
     private final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler;
23
     private final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler;
37
 
37
 
38
     @Override
38
     @Override
39
     public void uncaughtException(Thread t, Throwable e) {
39
     public void uncaughtException(Thread t, Throwable e) {
40
-        Log.e(this.getClass().getSimpleName(), "FATAL ERROR", e);
40
+        JitsiMeetLogger.e(e, this.getClass().getSimpleName() + " FATAL ERROR");
41
 
41
 
42
         // Abort all ConnectionService ongoing calls
42
         // Abort all ConnectionService ongoing calls
43
         if (AudioModeModule.useConnectionService()) {
43
         if (AudioModeModule.useConnectionService()) {

+ 3
- 8
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java Näytä tiedosto

19
 
19
 
20
 import android.content.Context;
20
 import android.content.Context;
21
 import android.os.Bundle;
21
 import android.os.Bundle;
22
-import android.util.Log;
23
 import androidx.annotation.NonNull;
22
 import androidx.annotation.NonNull;
24
 import androidx.annotation.Nullable;
23
 import androidx.annotation.Nullable;
25
 
24
 
26
 import com.facebook.react.bridge.ReadableMap;
25
 import com.facebook.react.bridge.ReadableMap;
27
 
26
 
27
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
28
+
28
 import java.lang.reflect.Method;
29
 import java.lang.reflect.Method;
29
 import java.util.Map;
30
 import java.util.Map;
30
 
31
 
39
     private static final Map<String, Method> LISTENER_METHODS
40
     private static final Map<String, Method> LISTENER_METHODS
40
         = ListenerUtils.mapListenerMethods(JitsiMeetViewListener.class);
41
         = ListenerUtils.mapListenerMethods(JitsiMeetViewListener.class);
41
 
42
 
42
-    /**
43
-     * The {@link Log} tag which identifies the source of the log messages of
44
-     * {@code JitsiMeetView}.
45
-     */
46
-    private static final String TAG = JitsiMeetView.class.getSimpleName();
47
-
48
     /**
43
     /**
49
      * The URL of the current conference.
44
      * The URL of the current conference.
50
      */
45
      */
137
             try {
132
             try {
138
                 pipModule.enterPictureInPicture();
133
                 pipModule.enterPictureInPicture();
139
             } catch (RuntimeException re) {
134
             } catch (RuntimeException re) {
140
-                Log.e(TAG, "failed to enter PiP mode", re);
135
+                JitsiMeetLogger.e(re, "Failed to enter PiP mode");
141
             }
136
             }
142
         }
137
         }
143
     }
138
     }

+ 73
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/LogBridgeModule.java Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk;
18
+
19
+import com.facebook.react.bridge.ReactApplicationContext;
20
+import com.facebook.react.bridge.ReactContextBaseJavaModule;
21
+import com.facebook.react.bridge.ReactMethod;
22
+import com.facebook.react.module.annotations.ReactModule;
23
+
24
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
25
+
26
+import javax.annotation.Nonnull;
27
+
28
+/**
29
+ * Module implementing a "bridge" between the JS loggers and the native one.
30
+ */
31
+@ReactModule(name = LogBridgeModule.NAME)
32
+class LogBridgeModule extends ReactContextBaseJavaModule {
33
+    public static final String NAME = "LogBridge";
34
+
35
+    public LogBridgeModule(@Nonnull ReactApplicationContext reactContext) {
36
+        super(reactContext);
37
+    }
38
+
39
+    @Override
40
+    public String getName() {
41
+        return NAME;
42
+    }
43
+
44
+    @ReactMethod
45
+    public void trace(final String message) {
46
+        JitsiMeetLogger.v(message);
47
+    }
48
+
49
+    @ReactMethod
50
+    public void debug(final String message) {
51
+        JitsiMeetLogger.d(message);
52
+    }
53
+
54
+    @ReactMethod
55
+    public void info(final String message) {
56
+        JitsiMeetLogger.i(message);
57
+    }
58
+
59
+    @ReactMethod
60
+    public void log(final String message) {
61
+        JitsiMeetLogger.i(message);
62
+    }
63
+
64
+    @ReactMethod
65
+    public void warn(final String message) {
66
+        JitsiMeetLogger.w(message);
67
+    }
68
+
69
+    @ReactMethod
70
+    public void error(final String message) {
71
+        JitsiMeetLogger.e(message);
72
+    }
73
+}

+ 4
- 3
android/sdk/src/main/java/org/jitsi/meet/sdk/OngoingNotification.java Näytä tiedosto

24
 import android.content.Intent;
24
 import android.content.Intent;
25
 import android.os.Build;
25
 import android.os.Build;
26
 import androidx.core.app.NotificationCompat;
26
 import androidx.core.app.NotificationCompat;
27
-import android.util.Log;
27
+
28
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
28
 
29
 
29
 import java.util.Random;
30
 import java.util.Random;
30
 
31
 
50
 
51
 
51
         Context context = ReactInstanceManagerHolder.getCurrentActivity();
52
         Context context = ReactInstanceManagerHolder.getCurrentActivity();
52
         if (context == null) {
53
         if (context == null) {
53
-            Log.w(TAG, "Cannot create notification channel: no current context");
54
+            JitsiMeetLogger.w(TAG + " Cannot create notification channel: no current context");
54
             return;
55
             return;
55
         }
56
         }
56
 
57
 
75
     static Notification buildOngoingConferenceNotification() {
76
     static Notification buildOngoingConferenceNotification() {
76
         Context context = ReactInstanceManagerHolder.getCurrentActivity();
77
         Context context = ReactInstanceManagerHolder.getCurrentActivity();
77
         if (context == null) {
78
         if (context == null) {
78
-            Log.w(TAG, "Cannot create notification: no current context");
79
+            JitsiMeetLogger.w(TAG + " Cannot create notification: no current context");
79
             return null;
80
             return null;
80
         }
81
         }
81
 
82
 

+ 3
- 2
android/sdk/src/main/java/org/jitsi/meet/sdk/PictureInPictureModule.java Näytä tiedosto

20
 import android.app.Activity;
20
 import android.app.Activity;
21
 import android.app.PictureInPictureParams;
21
 import android.app.PictureInPictureParams;
22
 import android.os.Build;
22
 import android.os.Build;
23
-import android.util.Log;
24
 import android.util.Rational;
23
 import android.util.Rational;
25
 
24
 
26
 import com.facebook.react.bridge.Promise;
25
 import com.facebook.react.bridge.Promise;
29
 import com.facebook.react.bridge.ReactMethod;
28
 import com.facebook.react.bridge.ReactMethod;
30
 import com.facebook.react.module.annotations.ReactModule;
29
 import com.facebook.react.module.annotations.ReactModule;
31
 
30
 
31
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
32
+
32
 @ReactModule(name = PictureInPictureModule.NAME)
33
 @ReactModule(name = PictureInPictureModule.NAME)
33
 class PictureInPictureModule
34
 class PictureInPictureModule
34
     extends ReactContextBaseJavaModule {
35
     extends ReactContextBaseJavaModule {
70
             throw new IllegalStateException("No current Activity!");
71
             throw new IllegalStateException("No current Activity!");
71
         }
72
         }
72
 
73
 
73
-        Log.d(TAG, "Entering Picture-in-Picture");
74
+        JitsiMeetLogger.i(TAG + " Entering Picture-in-Picture");
74
 
75
 
75
         PictureInPictureParams.Builder builder
76
         PictureInPictureParams.Builder builder
76
             = new PictureInPictureParams.Builder()
77
             = new PictureInPictureParams.Builder()

+ 8
- 7
android/sdk/src/main/java/org/jitsi/meet/sdk/RNConnectionService.java Näytä tiedosto

10
 import android.telecom.PhoneAccountHandle;
10
 import android.telecom.PhoneAccountHandle;
11
 import android.telecom.TelecomManager;
11
 import android.telecom.TelecomManager;
12
 import android.telecom.VideoProfile;
12
 import android.telecom.VideoProfile;
13
-import android.util.Log;
14
 import androidx.annotation.RequiresApi;
13
 import androidx.annotation.RequiresApi;
15
 
14
 
16
 import com.facebook.react.bridge.Promise;
15
 import com.facebook.react.bridge.Promise;
20
 import com.facebook.react.bridge.ReadableMap;
19
 import com.facebook.react.bridge.ReadableMap;
21
 import com.facebook.react.module.annotations.ReactModule;
20
 import com.facebook.react.module.annotations.ReactModule;
22
 
21
 
22
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
23
+
23
 /**
24
 /**
24
  * The react-native side of Jitsi Meet's {@link ConnectionService}. Exposes
25
  * The react-native side of Jitsi Meet's {@link ConnectionService}. Exposes
25
  * the Java Script API.
26
  * the Java Script API.
74
             String handle,
75
             String handle,
75
             boolean hasVideo,
76
             boolean hasVideo,
76
             Promise promise) {
77
             Promise promise) {
77
-        Log.d(TAG,
78
-              String.format("startCall UUID=%s, h=%s, v=%s",
78
+        JitsiMeetLogger.d("%d startCall UUID=%s, h=%s, v=%s",
79
+                            TAG,
79
                             callUUID,
80
                             callUUID,
80
                             handle,
81
                             handle,
81
-                            hasVideo));
82
+                            hasVideo);
82
 
83
 
83
         ReactApplicationContext ctx = getReactApplicationContext();
84
         ReactApplicationContext ctx = getReactApplicationContext();
84
 
85
 
118
      */
119
      */
119
     @ReactMethod
120
     @ReactMethod
120
     public void reportCallFailed(String callUUID) {
121
     public void reportCallFailed(String callUUID) {
121
-        Log.d(TAG, "reportCallFailed " + callUUID);
122
+        JitsiMeetLogger.d(TAG + " reportCallFailed " + callUUID);
122
         ConnectionService.setConnectionDisconnected(
123
         ConnectionService.setConnectionDisconnected(
123
                 callUUID,
124
                 callUUID,
124
                 new DisconnectCause(DisconnectCause.ERROR));
125
                 new DisconnectCause(DisconnectCause.ERROR));
131
      */
132
      */
132
     @ReactMethod
133
     @ReactMethod
133
     public void endCall(String callUUID) {
134
     public void endCall(String callUUID) {
134
-        Log.d(TAG, "endCall " + callUUID);
135
+        JitsiMeetLogger.d(TAG + " endCall " + callUUID);
135
         ConnectionService.setConnectionDisconnected(
136
         ConnectionService.setConnectionDisconnected(
136
                 callUUID,
137
                 callUUID,
137
                 new DisconnectCause(DisconnectCause.LOCAL));
138
                 new DisconnectCause(DisconnectCause.LOCAL));
144
      */
145
      */
145
     @ReactMethod
146
     @ReactMethod
146
     public void reportConnectedOutgoingCall(String callUUID) {
147
     public void reportConnectedOutgoingCall(String callUUID) {
147
-        Log.d(TAG, "reportConnectedOutgoingCall " + callUUID);
148
+        JitsiMeetLogger.d(TAG + " reportConnectedOutgoingCall " + callUUID);
148
         ConnectionService.setConnectionActive(callUUID);
149
         ConnectionService.setConnectionActive(callUUID);
149
     }
150
     }
150
 
151
 

+ 2
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Näytä tiedosto

34
 import com.oney.WebRTCModule.RTCVideoViewManager;
34
 import com.oney.WebRTCModule.RTCVideoViewManager;
35
 import com.oney.WebRTCModule.WebRTCModule;
35
 import com.oney.WebRTCModule.WebRTCModule;
36
 
36
 
37
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
37
 import org.webrtc.SoftwareVideoDecoderFactory;
38
 import org.webrtc.SoftwareVideoDecoderFactory;
38
 import org.webrtc.SoftwareVideoEncoderFactory;
39
 import org.webrtc.SoftwareVideoEncoderFactory;
39
 import org.webrtc.VideoDecoderFactory;
40
 import org.webrtc.VideoDecoderFactory;
67
                 new DropboxModule(reactContext),
68
                 new DropboxModule(reactContext),
68
                 new ExternalAPIModule(reactContext),
69
                 new ExternalAPIModule(reactContext),
69
                 new LocaleDetector(reactContext),
70
                 new LocaleDetector(reactContext),
71
+                new LogBridgeModule(reactContext),
70
                 new PictureInPictureModule(reactContext),
72
                 new PictureInPictureModule(reactContext),
71
                 new ProximityModule(reactContext),
73
                 new ProximityModule(reactContext),
72
                 new WiFiStatsModule(reactContext),
74
                 new WiFiStatsModule(reactContext),

+ 4
- 6
android/sdk/src/main/java/org/jitsi/meet/sdk/WiFiStatsModule.java Näytä tiedosto

19
 import android.content.Context;
19
 import android.content.Context;
20
 import android.net.wifi.WifiInfo;
20
 import android.net.wifi.WifiInfo;
21
 import android.net.wifi.WifiManager;
21
 import android.net.wifi.WifiManager;
22
-import android.util.Log;
23
 
22
 
24
 import com.facebook.react.bridge.Promise;
23
 import com.facebook.react.bridge.Promise;
25
 import com.facebook.react.bridge.ReactApplicationContext;
24
 import com.facebook.react.bridge.ReactApplicationContext;
27
 import com.facebook.react.bridge.ReactMethod;
26
 import com.facebook.react.bridge.ReactMethod;
28
 import com.facebook.react.module.annotations.ReactModule;
27
 import com.facebook.react.module.annotations.ReactModule;
29
 
28
 
29
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
30
 import org.json.JSONArray;
30
 import org.json.JSONArray;
31
 import org.json.JSONObject;
31
 import org.json.JSONObject;
32
 
32
 
184
 
184
 
185
                         }
185
                         }
186
                     } catch (SocketException e) {
186
                     } catch (SocketException e) {
187
-                        Log.wtf(TAG,
188
-                            "Unable to NetworkInterface.getNetworkInterfaces()"
189
-                        );
187
+                        JitsiMeetLogger.e(e, TAG + " Unable to NetworkInterface.getNetworkInterfaces()");
190
                     }
188
                     }
191
 
189
 
192
                     result.put("addresses", addresses);
190
                     result.put("addresses", addresses);
193
                     promise.resolve(result.toString());
191
                     promise.resolve(result.toString());
194
 
192
 
195
-                    Log.d(TAG, "WiFi stats: " + result.toString());
193
+                    JitsiMeetLogger.d(TAG + " WiFi stats: " + result.toString());
196
                 } catch (Throwable e) {
194
                 } catch (Throwable e) {
197
-                    Log.e(TAG, "Failed to obtain wifi stats", e);
195
+                    JitsiMeetLogger.e(e, TAG + " Failed to obtain wifi stats");
198
                     promise.reject(
196
                     promise.reject(
199
                         new Exception("Failed to obtain wifi stats"));
197
                         new Exception("Failed to obtain wifi stats"));
200
                 }
198
                 }

+ 49
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/log/JitsiMeetBaseLogHandler.java Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.log;
18
+
19
+import android.util.Log;
20
+
21
+import org.jetbrains.annotations.NotNull;
22
+import org.jetbrains.annotations.Nullable;
23
+
24
+import java.text.MessageFormat;
25
+
26
+import timber.log.Timber;
27
+
28
+/**
29
+ * Base class for all custom log handlers. Implementations must inherit from this class and
30
+ * implement a `doLog` method which does the actual logging, in addition with a `getTag` method
31
+ * with which to tag all logs coming into this logger.
32
+ *
33
+ * See {@link JitsiMeetDefaultLogHandler} for an example.
34
+ */
35
+public abstract class JitsiMeetBaseLogHandler extends Timber.Tree {
36
+    @Override
37
+    protected void log(int priority, @Nullable String tag, @NotNull String msg, @Nullable Throwable t) {
38
+        String errmsg = Log.getStackTraceString(t);
39
+        if (errmsg.isEmpty()) {
40
+            doLog(priority, getTag(), msg);
41
+        } else {
42
+            doLog(priority, getTag(), MessageFormat.format("{0}\n{1}", msg, errmsg));
43
+        }
44
+    }
45
+
46
+    protected abstract void doLog(int priority, @NotNull String tag, @NotNull String msg);
47
+
48
+    protected abstract String getTag();
49
+}

+ 39
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/log/JitsiMeetDefaultLogHandler.java Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.log;
18
+
19
+import android.util.Log;
20
+
21
+import org.jetbrains.annotations.NotNull;
22
+
23
+/**
24
+ * Default implementation of a {@link JitsiMeetBaseLogHandler}. This is the main SDK logger, which
25
+ * logs using the Android util.Log module.
26
+ */
27
+public class JitsiMeetDefaultLogHandler extends JitsiMeetBaseLogHandler {
28
+    private static final String TAG = "JitsiMeetSDK";
29
+
30
+    @Override
31
+    protected void doLog(int priority, @NotNull String tag, @NotNull String msg) {
32
+        Log.println(priority, tag, msg);
33
+    }
34
+
35
+    @Override
36
+    protected String getTag() {
37
+        return TAG;
38
+    }
39
+}

+ 94
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/log/JitsiMeetLogger.java Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.log;
18
+
19
+import timber.log.Timber;
20
+
21
+public class JitsiMeetLogger {
22
+    static {
23
+        addHandler(new JitsiMeetDefaultLogHandler());
24
+    }
25
+
26
+    public static void addHandler(JitsiMeetBaseLogHandler handler) {
27
+        Timber.plant(handler);
28
+    }
29
+
30
+    public static void removeHandler(JitsiMeetBaseLogHandler handler) {
31
+        Timber.uproot(handler);
32
+    }
33
+
34
+    public static void v(String message, Object... args) {
35
+        Timber.v(message, args);
36
+    }
37
+
38
+    public static void v(Throwable t, String message, Object... args) {
39
+        Timber.v(t, message, args);
40
+    }
41
+
42
+    public static void v(Throwable t) {
43
+        Timber.v(t);
44
+    }
45
+
46
+    public static void d(String message, Object... args) {
47
+        Timber.d(message, args);
48
+    }
49
+
50
+    public static void d(Throwable t, String message, Object... args) {
51
+        Timber.d(t, message, args);
52
+    }
53
+
54
+    public static void d(Throwable t) {
55
+        Timber.d(t);
56
+    }
57
+
58
+    public static void i(String message, Object... args) {
59
+        Timber.i(message, args);
60
+    }
61
+
62
+    public static void i(Throwable t, String message, Object... args) {
63
+        Timber.i(t, message, args);
64
+    }
65
+
66
+    public static void i(Throwable t) {
67
+        Timber.i(t);
68
+    }
69
+
70
+    public static void w(String message, Object... args) {
71
+        Timber.w(message, args);
72
+    }
73
+
74
+    public static void w(Throwable t, String message, Object... args) {
75
+        Timber.w(t, message, args);
76
+    }
77
+
78
+    public static void w(Throwable t) {
79
+        Timber.w(t);
80
+    }
81
+
82
+    public static void e(String message, Object... args) {
83
+        Timber.e(message, args);
84
+    }
85
+
86
+    public static void e(Throwable t, String message, Object... args) {
87
+        Timber.e(t, message, args);
88
+    }
89
+
90
+    public static void e(Throwable t) {
91
+        Timber.e(t);
92
+    }
93
+
94
+}

+ 4
- 4
android/sdk/src/main/java/org/jitsi/meet/sdk/net/NAT64AddrInfoModule.java Näytä tiedosto

15
  */
15
  */
16
 package org.jitsi.meet.sdk.net;
16
 package org.jitsi.meet.sdk.net;
17
 
17
 
18
-import android.util.Log;
19
-
20
 import com.facebook.react.bridge.Promise;
18
 import com.facebook.react.bridge.Promise;
21
 import com.facebook.react.bridge.ReactApplicationContext;
19
 import com.facebook.react.bridge.ReactApplicationContext;
22
 import com.facebook.react.bridge.ReactContextBaseJavaModule;
20
 import com.facebook.react.bridge.ReactContextBaseJavaModule;
23
 import com.facebook.react.bridge.ReactMethod;
21
 import com.facebook.react.bridge.ReactMethod;
24
 import com.facebook.react.module.annotations.ReactModule;
22
 import com.facebook.react.module.annotations.ReactModule;
25
 
23
 
24
+import org.jitsi.meet.sdk.log.JitsiMeetLogger;
25
+
26
 import java.net.UnknownHostException;
26
 import java.net.UnknownHostException;
27
 
27
 
28
 /**
28
 /**
97
             try {
97
             try {
98
                 info = NAT64AddrInfo.discover(host);
98
                 info = NAT64AddrInfo.discover(host);
99
             } catch (UnknownHostException e) {
99
             } catch (UnknownHostException e) {
100
-                Log.e(TAG, "NAT64AddrInfo.discover: " + host, e);
100
+                JitsiMeetLogger.e(e, TAG + " NAT64AddrInfo.discover: " + host);
101
             }
101
             }
102
             infoTimestamp = System.currentTimeMillis();
102
             infoTimestamp = System.currentTimeMillis();
103
         }
103
         }
107
         try {
107
         try {
108
             result = info == null ? null : info.getIPv6Address(ipv4Address);
108
             result = info == null ? null : info.getIPv6Address(ipv4Address);
109
         } catch (IllegalArgumentException exc) {
109
         } catch (IllegalArgumentException exc) {
110
-            Log.e(TAG, "Failed to get IPv6 address for: " + ipv4Address, exc);
110
+            JitsiMeetLogger.e(exc, TAG + " Failed to get IPv6 address for: " + ipv4Address);
111
 
111
 
112
             // We don't want to reject. It's not a big deal if there's no IPv6
112
             // We don't want to reject. It's not a big deal if there's no IPv6
113
             // address resolved.
113
             // address resolved.

+ 1
- 0
ios/Podfile Näytä tiedosto

61
   #
61
   #
62
 
62
 
63
   pod 'Amplitude-iOS', '~> 4.0.4'
63
   pod 'Amplitude-iOS', '~> 4.0.4'
64
+  pod 'CocoaLumberjack', '~>3.5.3'
64
   pod 'ObjectiveDropboxOfficial', '~> 3.9.4'
65
   pod 'ObjectiveDropboxOfficial', '~> 3.9.4'
65
 
66
 
66
   use_native_modules!
67
   use_native_modules!

+ 8
- 2
ios/Podfile.lock Näytä tiedosto

3
   - boost-for-react-native (1.63.0)
3
   - boost-for-react-native (1.63.0)
4
   - BVLinearGradient (2.5.6):
4
   - BVLinearGradient (2.5.6):
5
     - React
5
     - React
6
+  - CocoaLumberjack (3.5.3):
7
+    - CocoaLumberjack/Core (= 3.5.3)
8
+  - CocoaLumberjack/Core (3.5.3)
6
   - Crashlytics (3.12.0):
9
   - Crashlytics (3.12.0):
7
     - Fabric (~> 1.9.0)
10
     - Fabric (~> 1.9.0)
8
   - DoubleConversion (1.1.6)
11
   - DoubleConversion (1.1.6)
187
 DEPENDENCIES:
190
 DEPENDENCIES:
188
   - Amplitude-iOS (~> 4.0.4)
191
   - Amplitude-iOS (~> 4.0.4)
189
   - BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
192
   - BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
193
+  - CocoaLumberjack (~> 3.5.3)
190
   - Crashlytics (~> 3.12.0)
194
   - Crashlytics (~> 3.12.0)
191
   - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
195
   - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
192
   - Fabric (~> 1.9.0)
196
   - Fabric (~> 1.9.0)
205
   - react-native-background-timer (from `../node_modules/react-native-background-timer`)
209
   - react-native-background-timer (from `../node_modules/react-native-background-timer`)
206
   - react-native-calendar-events (from `../node_modules/react-native-calendar-events`)
210
   - react-native-calendar-events (from `../node_modules/react-native-calendar-events`)
207
   - react-native-keep-awake (from `../node_modules/react-native-keep-awake`)
211
   - react-native-keep-awake (from `../node_modules/react-native-keep-awake`)
208
-  - react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)
212
+  - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
209
   - react-native-webrtc (from `../node_modules/react-native-webrtc`)
213
   - react-native-webrtc (from `../node_modules/react-native-webrtc`)
210
   - react-native-webview (from `../node_modules/react-native-webview`)
214
   - react-native-webview (from `../node_modules/react-native-webview`)
211
   - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
215
   - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
229
   https://github.com/cocoapods/specs.git:
233
   https://github.com/cocoapods/specs.git:
230
     - Amplitude-iOS
234
     - Amplitude-iOS
231
     - boost-for-react-native
235
     - boost-for-react-native
236
+    - CocoaLumberjack
232
     - Crashlytics
237
     - Crashlytics
233
     - Fabric
238
     - Fabric
234
     - Firebase
239
     - Firebase
317
   Amplitude-iOS: 2ad4d7270c99186236c1272a3a9425463b1ae1a7
322
   Amplitude-iOS: 2ad4d7270c99186236c1272a3a9425463b1ae1a7
318
   boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
323
   boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
319
   BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
324
   BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
325
+  CocoaLumberjack: 2f44e60eb91c176d471fdba43b9e3eae6a721947
320
   Crashlytics: 07fb167b1694128c1c9a5a5cc319b0e9c3ca0933
326
   Crashlytics: 07fb167b1694128c1c9a5a5cc319b0e9c3ca0933
321
   DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
327
   DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
322
   Fabric: f988e33c97f08930a413e08123064d2e5f68d655
328
   Fabric: f988e33c97f08930a413e08123064d2e5f68d655
365
   RNWatch: 09738b339eceb66e4d80a2371633ca5fb380fa42
371
   RNWatch: 09738b339eceb66e4d80a2371633ca5fb380fa42
366
   yoga: 312528f5bbbba37b4dcea5ef00e8b4033fdd9411
372
   yoga: 312528f5bbbba37b4dcea5ef00e8b4033fdd9411
367
 
373
 
368
-PODFILE CHECKSUM: 0907bfe60b5b5f11dbdc6b4e65d40a248d000513
374
+PODFILE CHECKSUM: 0e3406a4217cc348dcadad5b016e8d939d4aa61f
369
 
375
 
370
 COCOAPODS: 1.7.2
376
 COCOAPODS: 1.7.2

+ 32
- 4
ios/sdk/sdk.xcodeproj/project.pbxproj Näytä tiedosto

26
 		0BCA496C1EC4BBF900B793EE /* jitsi.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0BCA496B1EC4BBF900B793EE /* jitsi.ttf */; };
26
 		0BCA496C1EC4BBF900B793EE /* jitsi.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0BCA496B1EC4BBF900B793EE /* jitsi.ttf */; };
27
 		0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BD906E81EC0C00300C8C18E /* JitsiMeet.h */; settings = {ATTRIBUTES = (Public, ); }; };
27
 		0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BD906E81EC0C00300C8C18E /* JitsiMeet.h */; settings = {ATTRIBUTES = (Public, ); }; };
28
 		0F65EECE1D95DA94561BB47E /* libPods-JitsiMeet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03F2ADC957FF109849B7FCA1 /* libPods-JitsiMeet.a */; };
28
 		0F65EECE1D95DA94561BB47E /* libPods-JitsiMeet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03F2ADC957FF109849B7FCA1 /* libPods-JitsiMeet.a */; };
29
-		C30F88D0CB0F4F5593216D24 /* liveStreamingOff.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C30F88D1CB0F4F5593216D24 /* liveStreamingOff.mp3 */; };
30
-		C30F88D2CB0F4F5593216D24 /* liveStreamingOn.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C30F88D3CB0F4F5593216D24 /* liveStreamingOn.mp3 */; };
31
 		6C31EDC820C06D490089C899 /* recordingOn.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6C31EDC720C06D490089C899 /* recordingOn.mp3 */; };
29
 		6C31EDC820C06D490089C899 /* recordingOn.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6C31EDC720C06D490089C899 /* recordingOn.mp3 */; };
32
 		6C31EDCA20C06D530089C899 /* recordingOff.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6C31EDC920C06D530089C899 /* recordingOff.mp3 */; };
30
 		6C31EDCA20C06D530089C899 /* recordingOff.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6C31EDC920C06D530089C899 /* recordingOff.mp3 */; };
33
 		75635B0A20751D6D00F29C9F /* joined.wav in Resources */ = {isa = PBXBuildFile; fileRef = 75635B0820751D6D00F29C9F /* joined.wav */; };
31
 		75635B0A20751D6D00F29C9F /* joined.wav in Resources */ = {isa = PBXBuildFile; fileRef = 75635B0820751D6D00F29C9F /* joined.wav */; };
36
 		A4414AE020B37F1A003546E6 /* rejected.wav in Resources */ = {isa = PBXBuildFile; fileRef = A4414ADF20B37F1A003546E6 /* rejected.wav */; };
34
 		A4414AE020B37F1A003546E6 /* rejected.wav in Resources */ = {isa = PBXBuildFile; fileRef = A4414ADF20B37F1A003546E6 /* rejected.wav */; };
37
 		A480429C21EE335600289B73 /* AmplitudeModule.m in Sources */ = {isa = PBXBuildFile; fileRef = A480429B21EE335600289B73 /* AmplitudeModule.m */; };
35
 		A480429C21EE335600289B73 /* AmplitudeModule.m in Sources */ = {isa = PBXBuildFile; fileRef = A480429B21EE335600289B73 /* AmplitudeModule.m */; };
38
 		A4A934E9212F3ADB001E9388 /* Dropbox.m in Sources */ = {isa = PBXBuildFile; fileRef = A4A934E8212F3ADB001E9388 /* Dropbox.m */; };
36
 		A4A934E9212F3ADB001E9388 /* Dropbox.m in Sources */ = {isa = PBXBuildFile; fileRef = A4A934E8212F3ADB001E9388 /* Dropbox.m */; };
37
+		C30F88D0CB0F4F5593216D24 /* liveStreamingOff.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C30F88D1CB0F4F5593216D24 /* liveStreamingOff.mp3 */; };
38
+		C30F88D2CB0F4F5593216D24 /* liveStreamingOn.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C30F88D3CB0F4F5593216D24 /* liveStreamingOn.mp3 */; };
39
 		C6245F5D2053091D0040BE68 /* image-resize@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6245F5B2053091D0040BE68 /* image-resize@2x.png */; };
39
 		C6245F5D2053091D0040BE68 /* image-resize@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6245F5B2053091D0040BE68 /* image-resize@2x.png */; };
40
 		C6245F5E2053091D0040BE68 /* image-resize@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6245F5C2053091D0040BE68 /* image-resize@3x.png */; };
40
 		C6245F5E2053091D0040BE68 /* image-resize@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6245F5C2053091D0040BE68 /* image-resize@3x.png */; };
41
 		C69EFA0C209A0F660027712B /* JMCallKitEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69EFA09209A0F650027712B /* JMCallKitEmitter.swift */; };
41
 		C69EFA0C209A0F660027712B /* JMCallKitEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69EFA09209A0F650027712B /* JMCallKitEmitter.swift */; };
43
 		C69EFA0E209A0F660027712B /* JMCallKitListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69EFA0B209A0F660027712B /* JMCallKitListener.swift */; };
43
 		C69EFA0E209A0F660027712B /* JMCallKitListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69EFA0B209A0F660027712B /* JMCallKitListener.swift */; };
44
 		C6A34261204EF76800E062DD /* DragGestureController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6A3425E204EF76800E062DD /* DragGestureController.swift */; };
44
 		C6A34261204EF76800E062DD /* DragGestureController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6A3425E204EF76800E062DD /* DragGestureController.swift */; };
45
 		C6CC49AF207412CF000DFA42 /* PiPViewCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6CC49AE207412CF000DFA42 /* PiPViewCoordinator.swift */; };
45
 		C6CC49AF207412CF000DFA42 /* PiPViewCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6CC49AE207412CF000DFA42 /* PiPViewCoordinator.swift */; };
46
+		DE65AACA2317FFCD00290BEC /* LogUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = DE65AAC92317FFCD00290BEC /* LogUtils.h */; };
47
+		DE65AACC2318028300290BEC /* JitsiMeetBaseLogHandler+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DE65AACB2318028300290BEC /* JitsiMeetBaseLogHandler+Private.h */; };
46
 		DE762DB422AFDE76000DEBD6 /* JitsiMeetUserInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = DE762DB322AFDE76000DEBD6 /* JitsiMeetUserInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
48
 		DE762DB422AFDE76000DEBD6 /* JitsiMeetUserInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = DE762DB322AFDE76000DEBD6 /* JitsiMeetUserInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
47
 		DE762DB622AFDE8D000DEBD6 /* JitsiMeetUserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = DE762DB522AFDE8D000DEBD6 /* JitsiMeetUserInfo.m */; };
49
 		DE762DB622AFDE8D000DEBD6 /* JitsiMeetUserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = DE762DB522AFDE8D000DEBD6 /* JitsiMeetUserInfo.m */; };
50
+		DE81A2D42316AC4D00AE1940 /* JitsiMeetLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = DE81A2D22316AC4D00AE1940 /* JitsiMeetLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
51
+		DE81A2D52316AC4D00AE1940 /* JitsiMeetLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DE81A2D32316AC4D00AE1940 /* JitsiMeetLogger.m */; };
52
+		DE81A2D92316AC7600AE1940 /* LogBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = DE81A2D72316AC7600AE1940 /* LogBridge.m */; };
53
+		DE81A2DE2317ED5400AE1940 /* JitsiMeetBaseLogHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = DE81A2DC2317ED5400AE1940 /* JitsiMeetBaseLogHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
54
+		DE81A2DF2317ED5400AE1940 /* JitsiMeetBaseLogHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = DE81A2DD2317ED5400AE1940 /* JitsiMeetBaseLogHandler.m */; };
48
 		DEAD3226220C497000E93636 /* JitsiMeetConferenceOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = DEAD3224220C497000E93636 /* JitsiMeetConferenceOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55
 		DEAD3226220C497000E93636 /* JitsiMeetConferenceOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = DEAD3224220C497000E93636 /* JitsiMeetConferenceOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
49
 		DEAD3227220C497000E93636 /* JitsiMeetConferenceOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = DEAD3225220C497000E93636 /* JitsiMeetConferenceOptions.m */; };
56
 		DEAD3227220C497000E93636 /* JitsiMeetConferenceOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = DEAD3225220C497000E93636 /* JitsiMeetConferenceOptions.m */; };
50
 		DEAFA779229EAD520033A7FA /* RNRootView.m in Sources */ = {isa = PBXBuildFile; fileRef = DEAFA778229EAD520033A7FA /* RNRootView.m */; };
57
 		DEAFA779229EAD520033A7FA /* RNRootView.m in Sources */ = {isa = PBXBuildFile; fileRef = DEAFA778229EAD520033A7FA /* RNRootView.m */; };
77
 		0BD906E51EC0C00300C8C18E /* JitsiMeet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JitsiMeet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
84
 		0BD906E51EC0C00300C8C18E /* JitsiMeet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JitsiMeet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
78
 		0BD906E81EC0C00300C8C18E /* JitsiMeet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeet.h; sourceTree = "<group>"; };
85
 		0BD906E81EC0C00300C8C18E /* JitsiMeet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeet.h; sourceTree = "<group>"; };
79
 		0BD906E91EC0C00300C8C18E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
86
 		0BD906E91EC0C00300C8C18E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
80
-		C30F88D1CB0F4F5593216D24 /* liveStreamingOff.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = liveStreamingOff.mp3; path = ../../sounds/liveStreamingOff.mp3; sourceTree = "<group>"; };
81
-		C30F88D3CB0F4F5593216D24 /* liveStreamingOn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = liveStreamingOn.mp3; path = ../../sounds/liveStreamingOn.mp3; sourceTree = "<group>"; };
82
 		6C31EDC720C06D490089C899 /* recordingOn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = recordingOn.mp3; path = ../../sounds/recordingOn.mp3; sourceTree = "<group>"; };
87
 		6C31EDC720C06D490089C899 /* recordingOn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = recordingOn.mp3; path = ../../sounds/recordingOn.mp3; sourceTree = "<group>"; };
83
 		6C31EDC920C06D530089C899 /* recordingOff.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = recordingOff.mp3; path = ../../sounds/recordingOff.mp3; sourceTree = "<group>"; };
88
 		6C31EDC920C06D530089C899 /* recordingOff.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = recordingOff.mp3; path = ../../sounds/recordingOff.mp3; sourceTree = "<group>"; };
84
 		75635B0820751D6D00F29C9F /* joined.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = joined.wav; path = ../../sounds/joined.wav; sourceTree = "<group>"; };
89
 		75635B0820751D6D00F29C9F /* joined.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = joined.wav; path = ../../sounds/joined.wav; sourceTree = "<group>"; };
90
 		A480429B21EE335600289B73 /* AmplitudeModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AmplitudeModule.m; path = src/analytics/AmplitudeModule.m; sourceTree = SOURCE_ROOT; };
95
 		A480429B21EE335600289B73 /* AmplitudeModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AmplitudeModule.m; path = src/analytics/AmplitudeModule.m; sourceTree = SOURCE_ROOT; };
91
 		A4A934E8212F3ADB001E9388 /* Dropbox.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Dropbox.m; sourceTree = "<group>"; };
96
 		A4A934E8212F3ADB001E9388 /* Dropbox.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Dropbox.m; sourceTree = "<group>"; };
92
 		A4A934EB21349A06001E9388 /* Dropbox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Dropbox.h; sourceTree = "<group>"; };
97
 		A4A934EB21349A06001E9388 /* Dropbox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Dropbox.h; sourceTree = "<group>"; };
98
+		C30F88D1CB0F4F5593216D24 /* liveStreamingOff.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = liveStreamingOff.mp3; path = ../../sounds/liveStreamingOff.mp3; sourceTree = "<group>"; };
99
+		C30F88D3CB0F4F5593216D24 /* liveStreamingOn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = liveStreamingOn.mp3; path = ../../sounds/liveStreamingOn.mp3; sourceTree = "<group>"; };
93
 		C6245F5B2053091D0040BE68 /* image-resize@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "image-resize@2x.png"; path = "src/picture-in-picture/image-resize@2x.png"; sourceTree = "<group>"; };
100
 		C6245F5B2053091D0040BE68 /* image-resize@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "image-resize@2x.png"; path = "src/picture-in-picture/image-resize@2x.png"; sourceTree = "<group>"; };
94
 		C6245F5C2053091D0040BE68 /* image-resize@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "image-resize@3x.png"; path = "src/picture-in-picture/image-resize@3x.png"; sourceTree = "<group>"; };
101
 		C6245F5C2053091D0040BE68 /* image-resize@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "image-resize@3x.png"; path = "src/picture-in-picture/image-resize@3x.png"; sourceTree = "<group>"; };
95
 		C69EFA09209A0F650027712B /* JMCallKitEmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JMCallKitEmitter.swift; sourceTree = "<group>"; };
102
 		C69EFA09209A0F650027712B /* JMCallKitEmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JMCallKitEmitter.swift; sourceTree = "<group>"; };
98
 		C6A3425E204EF76800E062DD /* DragGestureController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DragGestureController.swift; sourceTree = "<group>"; };
105
 		C6A3425E204EF76800E062DD /* DragGestureController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DragGestureController.swift; sourceTree = "<group>"; };
99
 		C6CC49AE207412CF000DFA42 /* PiPViewCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiPViewCoordinator.swift; sourceTree = "<group>"; };
106
 		C6CC49AE207412CF000DFA42 /* PiPViewCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiPViewCoordinator.swift; sourceTree = "<group>"; };
100
 		C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetView+Private.h"; sourceTree = "<group>"; };
107
 		C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetView+Private.h"; sourceTree = "<group>"; };
108
+		DE65AAC92317FFCD00290BEC /* LogUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogUtils.h; sourceTree = "<group>"; };
109
+		DE65AACB2318028300290BEC /* JitsiMeetBaseLogHandler+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetBaseLogHandler+Private.h"; sourceTree = "<group>"; };
101
 		DE762DB322AFDE76000DEBD6 /* JitsiMeetUserInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetUserInfo.h; sourceTree = "<group>"; };
110
 		DE762DB322AFDE76000DEBD6 /* JitsiMeetUserInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetUserInfo.h; sourceTree = "<group>"; };
102
 		DE762DB522AFDE8D000DEBD6 /* JitsiMeetUserInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetUserInfo.m; sourceTree = "<group>"; };
111
 		DE762DB522AFDE8D000DEBD6 /* JitsiMeetUserInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetUserInfo.m; sourceTree = "<group>"; };
103
 		DE762DB722AFE166000DEBD6 /* JitsiMeetUserInfo+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetUserInfo+Private.h"; sourceTree = "<group>"; };
112
 		DE762DB722AFE166000DEBD6 /* JitsiMeetUserInfo+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetUserInfo+Private.h"; sourceTree = "<group>"; };
113
+		DE81A2D22316AC4D00AE1940 /* JitsiMeetLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetLogger.h; sourceTree = "<group>"; };
114
+		DE81A2D32316AC4D00AE1940 /* JitsiMeetLogger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetLogger.m; sourceTree = "<group>"; };
115
+		DE81A2D72316AC7600AE1940 /* LogBridge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LogBridge.m; sourceTree = "<group>"; };
116
+		DE81A2DC2317ED5400AE1940 /* JitsiMeetBaseLogHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetBaseLogHandler.h; sourceTree = "<group>"; };
117
+		DE81A2DD2317ED5400AE1940 /* JitsiMeetBaseLogHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetBaseLogHandler.m; sourceTree = "<group>"; };
104
 		DEAD3224220C497000E93636 /* JitsiMeetConferenceOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetConferenceOptions.h; sourceTree = "<group>"; };
118
 		DEAD3224220C497000E93636 /* JitsiMeetConferenceOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetConferenceOptions.h; sourceTree = "<group>"; };
105
 		DEAD3225220C497000E93636 /* JitsiMeetConferenceOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetConferenceOptions.m; sourceTree = "<group>"; };
119
 		DEAD3225220C497000E93636 /* JitsiMeetConferenceOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetConferenceOptions.m; sourceTree = "<group>"; };
106
 		DEAD3228220C734300E93636 /* JitsiMeetConferenceOptions+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetConferenceOptions+Private.h"; sourceTree = "<group>"; };
120
 		DEAD3228220C734300E93636 /* JitsiMeetConferenceOptions+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetConferenceOptions+Private.h"; sourceTree = "<group>"; };
186
 				DE762DB322AFDE76000DEBD6 /* JitsiMeetUserInfo.h */,
200
 				DE762DB322AFDE76000DEBD6 /* JitsiMeetUserInfo.h */,
187
 				DE762DB722AFE166000DEBD6 /* JitsiMeetUserInfo+Private.h */,
201
 				DE762DB722AFE166000DEBD6 /* JitsiMeetUserInfo+Private.h */,
188
 				DE762DB522AFDE8D000DEBD6 /* JitsiMeetUserInfo.m */,
202
 				DE762DB522AFDE8D000DEBD6 /* JitsiMeetUserInfo.m */,
203
+				DE81A2D22316AC4D00AE1940 /* JitsiMeetLogger.h */,
204
+				DE81A2D32316AC4D00AE1940 /* JitsiMeetLogger.m */,
205
+				DE81A2DC2317ED5400AE1940 /* JitsiMeetBaseLogHandler.h */,
206
+				DE65AACB2318028300290BEC /* JitsiMeetBaseLogHandler+Private.h */,
207
+				DE81A2DD2317ED5400AE1940 /* JitsiMeetBaseLogHandler.m */,
189
 				0B412F161EDEC65D00B1A0A6 /* JitsiMeetView.h */,
208
 				0B412F161EDEC65D00B1A0A6 /* JitsiMeetView.h */,
190
 				0B412F171EDEC65D00B1A0A6 /* JitsiMeetView.m */,
209
 				0B412F171EDEC65D00B1A0A6 /* JitsiMeetView.m */,
210
+				DE81A2D72316AC7600AE1940 /* LogBridge.m */,
211
+				DE65AAC92317FFCD00290BEC /* LogUtils.h */,
191
 				DEAFA777229EAD3B0033A7FA /* RNRootView.h */,
212
 				DEAFA777229EAD3B0033A7FA /* RNRootView.h */,
192
 				DEAFA778229EAD520033A7FA /* RNRootView.m */,
213
 				DEAFA778229EAD520033A7FA /* RNRootView.m */,
193
 				C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */,
214
 				C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */,
273
 				DE762DB422AFDE76000DEBD6 /* JitsiMeetUserInfo.h in Headers */,
294
 				DE762DB422AFDE76000DEBD6 /* JitsiMeetUserInfo.h in Headers */,
274
 				0B412F181EDEC65D00B1A0A6 /* JitsiMeetView.h in Headers */,
295
 				0B412F181EDEC65D00B1A0A6 /* JitsiMeetView.h in Headers */,
275
 				0B93EF7E1EC9DDCD0030D24D /* RCTBridgeWrapper.h in Headers */,
296
 				0B93EF7E1EC9DDCD0030D24D /* RCTBridgeWrapper.h in Headers */,
297
+				DE81A2DE2317ED5400AE1940 /* JitsiMeetBaseLogHandler.h in Headers */,
298
+				DE65AACC2318028300290BEC /* JitsiMeetBaseLogHandler+Private.h in Headers */,
276
 				0B412F221EDEF6EA00B1A0A6 /* JitsiMeetViewDelegate.h in Headers */,
299
 				0B412F221EDEF6EA00B1A0A6 /* JitsiMeetViewDelegate.h in Headers */,
277
 				0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */,
300
 				0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */,
301
+				DE81A2D42316AC4D00AE1940 /* JitsiMeetLogger.h in Headers */,
302
+				DE65AACA2317FFCD00290BEC /* LogUtils.h in Headers */,
278
 				DEAD3226220C497000E93636 /* JitsiMeetConferenceOptions.h in Headers */,
303
 				DEAD3226220C497000E93636 /* JitsiMeetConferenceOptions.h in Headers */,
279
 			);
304
 			);
280
 			runOnlyForDeploymentPostprocessing = 0;
305
 			runOnlyForDeploymentPostprocessing = 0;
496
 			buildActionMask = 2147483647;
521
 			buildActionMask = 2147483647;
497
 			files = (
522
 			files = (
498
 				0BB9AD7B1F5EC8F4001C08DB /* CallKit.m in Sources */,
523
 				0BB9AD7B1F5EC8F4001C08DB /* CallKit.m in Sources */,
524
+				DE81A2DF2317ED5400AE1940 /* JitsiMeetBaseLogHandler.m in Sources */,
499
 				0BB9AD7D1F60356D001C08DB /* AppInfo.m in Sources */,
525
 				0BB9AD7D1F60356D001C08DB /* AppInfo.m in Sources */,
526
+				DE81A2D92316AC7600AE1940 /* LogBridge.m in Sources */,
500
 				DEAFA779229EAD520033A7FA /* RNRootView.m in Sources */,
527
 				DEAFA779229EAD520033A7FA /* RNRootView.m in Sources */,
501
 				DE762DB622AFDE8D000DEBD6 /* JitsiMeetUserInfo.m in Sources */,
528
 				DE762DB622AFDE8D000DEBD6 /* JitsiMeetUserInfo.m in Sources */,
502
 				DEAD3227220C497000E93636 /* JitsiMeetConferenceOptions.m in Sources */,
529
 				DEAD3227220C497000E93636 /* JitsiMeetConferenceOptions.m in Sources */,
513
 				C6A34261204EF76800E062DD /* DragGestureController.swift in Sources */,
540
 				C6A34261204EF76800E062DD /* DragGestureController.swift in Sources */,
514
 				A4A934E9212F3ADB001E9388 /* Dropbox.m in Sources */,
541
 				A4A934E9212F3ADB001E9388 /* Dropbox.m in Sources */,
515
 				C69EFA0D209A0F660027712B /* JMCallKitProxy.swift in Sources */,
542
 				C69EFA0D209A0F660027712B /* JMCallKitProxy.swift in Sources */,
543
+				DE81A2D52316AC4D00AE1940 /* JitsiMeetLogger.m in Sources */,
516
 				C69EFA0E209A0F660027712B /* JMCallKitListener.swift in Sources */,
544
 				C69EFA0E209A0F660027712B /* JMCallKitListener.swift in Sources */,
517
 				0B412F191EDEC65D00B1A0A6 /* JitsiMeetView.m in Sources */,
545
 				0B412F191EDEC65D00B1A0A6 /* JitsiMeetView.m in Sources */,
518
 				DEFE535421FB1BF800011A3A /* JitsiMeet.m in Sources */,
546
 				DEFE535421FB1BF800011A3A /* JitsiMeet.m in Sources */,

+ 5
- 3
ios/sdk/src/AudioMode.m Näytä tiedosto

20
 #import <React/RCTLog.h>
20
 #import <React/RCTLog.h>
21
 #import <WebRTC/WebRTC.h>
21
 #import <WebRTC/WebRTC.h>
22
 
22
 
23
+#import "LogUtils.h"
24
+
23
 
25
 
24
 // Audio mode
26
 // Audio mode
25
 typedef enum {
27
 typedef enum {
167
 RCT_EXPORT_METHOD(setAudioDevice:(NSString *)device
169
 RCT_EXPORT_METHOD(setAudioDevice:(NSString *)device
168
                   resolve:(RCTPromiseResolveBlock)resolve
170
                   resolve:(RCTPromiseResolveBlock)resolve
169
                   reject:(RCTPromiseRejectBlock)reject) {
171
                   reject:(RCTPromiseRejectBlock)reject) {
170
-    NSLog(@"[AudioMode] Selected device: %@", device);
172
+    DDLogInfo(@"[AudioMode] Selected device: %@", device);
171
     
173
     
172
     RTCAudioSession *session = [RTCAudioSession sharedInstance];
174
     RTCAudioSession *session = [RTCAudioSession sharedInstance];
173
     [session lockForConfiguration];
175
     [session lockForConfiguration];
260
         // This is to play well with other components which could be integrated
262
         // This is to play well with other components which could be integrated
261
         // into the final application.
263
         // into the final application.
262
         if (self->activeMode != kAudioModeDefault) {
264
         if (self->activeMode != kAudioModeDefault) {
263
-            NSLog(@"[AudioMode] Route changed, reapplying RTCAudioSession config");
265
+            DDLogInfo(@"[AudioMode] Route changed, reapplying RTCAudioSession config");
264
             RTCAudioSessionConfiguration *config = [self configForMode:self->activeMode];
266
             RTCAudioSessionConfiguration *config = [self configForMode:self->activeMode];
265
             [self setConfig:config error:nil];
267
             [self setConfig:config error:nil];
266
             if (self->forceSpeaker && !self->isSpeakerOn) {
268
             if (self->forceSpeaker && !self->isSpeakerOn) {
274
 }
276
 }
275
 
277
 
276
 - (void)audioSession:(RTCAudioSession *)audioSession didSetActive:(BOOL)active {
278
 - (void)audioSession:(RTCAudioSession *)audioSession didSetActive:(BOOL)active {
277
-    NSLog(@"[AudioMode] Audio session didSetActive:%d", active);
279
+    DDLogInfo(@"[AudioMode] Audio session didSetActive:%d", active);
278
 }
280
 }
279
 
281
 
280
 #pragma mark - Helper methods
282
 #pragma mark - Helper methods

+ 2
- 0
ios/sdk/src/JitsiMeet.h Näytä tiedosto

18
 #import <JitsiMeet/JitsiMeetView.h>
18
 #import <JitsiMeet/JitsiMeetView.h>
19
 #import <JitsiMeet/JitsiMeetViewDelegate.h>
19
 #import <JitsiMeet/JitsiMeetViewDelegate.h>
20
 #import <JitsiMeet/JitsiMeetConferenceOptions.h>
20
 #import <JitsiMeet/JitsiMeetConferenceOptions.h>
21
+#import <JitsiMeet/JitsiMeetLogger.h>
22
+#import <JitsiMeet/JitsiMeetBaseLogHandler.h>
21
 
23
 
22
 
24
 
23
 @interface JitsiMeet : NSObject
25
 @interface JitsiMeet : NSObject

+ 24
- 0
ios/sdk/src/JitsiMeetBaseLogHandler+Private.h Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#import "LogUtils.h"
18
+#import "JitsiMeetBaseLogHandler.h"
19
+
20
+@interface JitsiMeetBaseLogHandler ()
21
+
22
+@property (nonatomic, retain) id<DDLogger> logger;
23
+
24
+@end

+ 28
- 0
ios/sdk/src/JitsiMeetBaseLogHandler.h Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#import <Foundation/Foundation.h>
18
+
19
+@interface JitsiMeetBaseLogHandler : NSObject
20
+
21
+// These are "abstract".
22
+- (void)logVerbose:(NSString *)msg;
23
+- (void)logDebug:(NSString *)msg;
24
+- (void)logInfo:(NSString *)msg;
25
+- (void)logWarn:(NSString *)msg;
26
+- (void)logError:(NSString *)msg;
27
+
28
+@end

+ 105
- 0
ios/sdk/src/JitsiMeetBaseLogHandler.m Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#import "JitsiMeetBaseLogHandler+Private.h"
18
+
19
+@interface PrivateLogger : DDAbstractLogger <DDLogger>
20
+@end
21
+
22
+@implementation PrivateLogger {
23
+    JitsiMeetBaseLogHandler *_delegate;
24
+}
25
+
26
+- (instancetype)initWithDelegate:(JitsiMeetBaseLogHandler *)delegate {
27
+    if (self = [super init]) {
28
+        _delegate = delegate;
29
+    }
30
+
31
+    return self;
32
+}
33
+
34
+#pragma mark - DDAbstractLogger interface
35
+
36
+- (void)logMessage:(DDLogMessage *)logMessage {
37
+    NSString *logMsg = logMessage.message;
38
+    
39
+    if (_logFormatter)
40
+        logMsg = [_logFormatter formatLogMessage:logMessage];
41
+    
42
+    if (logMsg && _delegate) {
43
+        switch (logMessage.flag) {
44
+            case DDLogFlagError:
45
+                [_delegate logError:logMsg];
46
+                break;
47
+            case DDLogFlagWarning:
48
+                [_delegate logWarn:logMsg];
49
+                break;
50
+            case DDLogFlagInfo:
51
+                [_delegate logInfo:logMsg];
52
+                break;
53
+            case DDLogFlagDebug:
54
+                [_delegate logDebug:logMsg];
55
+                break;
56
+            case DDLogFlagVerbose:
57
+                [_delegate logVerbose:logMsg];
58
+                break;
59
+        }
60
+    }
61
+}
62
+
63
+@end
64
+
65
+
66
+@implementation JitsiMeetBaseLogHandler
67
+
68
+#pragma mark - Proxy logger not to expose the CocoaLumberjack headers
69
+
70
+- (instancetype)init {
71
+    if (self = [super init]) {
72
+        self.logger = [[PrivateLogger alloc] initWithDelegate:self];
73
+    }
74
+
75
+    return self;
76
+}
77
+
78
+#pragma mark - Public API
79
+
80
+- (void)logVerbose:(NSString *)msg {
81
+    // Override me!
82
+    [self doesNotRecognizeSelector:_cmd];
83
+}
84
+
85
+- (void)logDebug:(NSString *)msg {
86
+    // Override me!
87
+    [self doesNotRecognizeSelector:_cmd];
88
+}
89
+
90
+- (void)logInfo:(NSString *)msg {
91
+    // Override me!
92
+    [self doesNotRecognizeSelector:_cmd];
93
+}
94
+
95
+- (void)logWarn:(NSString *)msg {
96
+    // Override me!
97
+    [self doesNotRecognizeSelector:_cmd];
98
+}
99
+
100
+- (void)logError:(NSString *)msg {
101
+    // Override me!
102
+    [self doesNotRecognizeSelector:_cmd];
103
+}
104
+
105
+@end

+ 27
- 0
ios/sdk/src/JitsiMeetLogger.h Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#import <Foundation/Foundation.h>
18
+
19
+#import "JitsiMeetBaseLogHandler.h"
20
+
21
+
22
+@interface JitsiMeetLogger : NSObject
23
+
24
++ (void)addHandler:(JitsiMeetBaseLogHandler *)handler;
25
++ (void)removeHandler:(JitsiMeetBaseLogHandler *)handler;
26
+
27
+@end

+ 40
- 0
ios/sdk/src/JitsiMeetLogger.m Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#import "LogUtils.h"
18
+#import "JitsiMeetLogger.h"
19
+#import "JitsiMeetBaseLogHandler+Private.h"
20
+
21
+
22
+@implementation JitsiMeetLogger
23
+
24
+/**
25
+* This gets called automagically when the program starts.
26
+*/
27
+__attribute__((constructor))
28
+static void initializeLogger() {
29
+    [DDLog addLogger:[DDOSLogger sharedInstance]];
30
+}
31
+
32
++ (void)addHandler:(JitsiMeetBaseLogHandler *)handler {
33
+    [DDLog addLogger:handler.logger];
34
+}
35
+
36
++ (void)removeHandler:(JitsiMeetBaseLogHandler *)handler {
37
+    [DDLog removeLogger:handler.logger];
38
+}
39
+
40
+@end

+ 57
- 0
ios/sdk/src/LogBridge.m Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#import <React/RCTBridgeModule.h>
18
+
19
+#import "LogUtils.h"
20
+
21
+
22
+@interface LogBridge : NSObject<RCTBridgeModule>
23
+@end
24
+
25
+@implementation LogBridge
26
+
27
+RCT_EXPORT_MODULE();
28
+
29
++ (BOOL)requiresMainQueueSetup {
30
+    return NO;
31
+}
32
+
33
+RCT_EXPORT_METHOD(trace:(NSString *)msg) {
34
+    DDLogDebug(@"%@", msg);
35
+}
36
+
37
+RCT_EXPORT_METHOD(debug:(NSString *)msg) {
38
+    DDLogDebug(@"%@", msg);
39
+}
40
+
41
+RCT_EXPORT_METHOD(info:(NSString *)msg) {
42
+    DDLogInfo(@"%@", msg);
43
+}
44
+
45
+RCT_EXPORT_METHOD(log:(NSString *)msg) {
46
+    DDLogInfo(@"%@", msg);
47
+}
48
+
49
+RCT_EXPORT_METHOD(warn:(NSString *)msg) {
50
+    DDLogWarn(@"%@", msg);
51
+}
52
+
53
+RCT_EXPORT_METHOD(error:(NSString *)msg) {
54
+    DDLogError(@"%@", msg);
55
+}
56
+
57
+@end

+ 23
- 0
ios/sdk/src/LogUtils.h Näytä tiedosto

1
+/*
2
+ * Copyright @ 2019-present 8x8, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+#ifndef JM_LOG_UTILS_H
18
+#define JM_LOG_UTILS_H
19
+
20
+#import <CocoaLumberjack/CocoaLumberjack.h>
21
+static const DDLogLevel ddLogLevel = DDLogLevelVerbose;
22
+
23
+#endif

+ 4
- 2
ios/sdk/src/analytics/AmplitudeModule.m Näytä tiedosto

15
  */
15
  */
16
 
16
 
17
 #import <React/RCTBridgeModule.h>
17
 #import <React/RCTBridgeModule.h>
18
+
18
 #import "Amplitude.h"
19
 #import "Amplitude.h"
20
+#import "LogUtils.h"
19
 
21
 
20
-@interface AmplitudeModule : NSObject<RCTBridgeModule>
21
 
22
 
23
+@interface AmplitudeModule : NSObject<RCTBridgeModule>
22
 @end
24
 @end
23
 
25
 
24
 @implementation AmplitudeModule
26
 @implementation AmplitudeModule
50
                                                                    options:NSJSONReadingMutableContainers
52
                                                                    options:NSJSONReadingMutableContainers
51
                                                                      error:&error];
53
                                                                      error:&error];
52
     if (eventProperties == nil) {
54
     if (eventProperties == nil) {
53
-        NSLog(@"[Amplitude handler] Error parsing event properties: %@", error);
55
+        DDLogError(@"[Amplitude] Error parsing event properties: %@", error);
54
     } else {
56
     } else {
55
         [[Amplitude instanceWithName:instanceName] logEvent:eventType withEventProperties:eventProperties];
57
         [[Amplitude instanceWithName:instanceName] logEvent:eventType withEventProperties:eventProperties];
56
     }
58
     }

+ 22
- 54
ios/sdk/src/callkit/CallKit.m Näytä tiedosto

30
 
30
 
31
 #import <JitsiMeet/JitsiMeet-Swift.h>
31
 #import <JitsiMeet/JitsiMeet-Swift.h>
32
 
32
 
33
+#import "LogUtils.h"
34
+
35
+
33
 // The events emitted/supported by RNCallKit:
36
 // The events emitted/supported by RNCallKit:
34
 static NSString * const RNCallKitPerformAnswerCallAction
37
 static NSString * const RNCallKitPerformAnswerCallAction
35
     = @"performAnswerCallAction";
38
     = @"performAnswerCallAction";
69
 RCT_EXPORT_METHOD(endCall:(NSString *)callUUID
72
 RCT_EXPORT_METHOD(endCall:(NSString *)callUUID
70
                   resolve:(RCTPromiseResolveBlock)resolve
73
                   resolve:(RCTPromiseResolveBlock)resolve
71
                    reject:(RCTPromiseRejectBlock)reject) {
74
                    reject:(RCTPromiseRejectBlock)reject) {
72
-#ifdef DEBUG
73
-    NSLog(@"[RNCallKit][endCall] callUUID = %@", callUUID);
74
-#endif
75
+    DDLogInfo(@"[RNCallKit][endCall] callUUID = %@", callUUID);
75
 
76
 
76
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
77
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
77
 
78
 
92
                      muted:(BOOL)muted
93
                      muted:(BOOL)muted
93
                    resolve:(RCTPromiseResolveBlock)resolve
94
                    resolve:(RCTPromiseResolveBlock)resolve
94
                     reject:(RCTPromiseRejectBlock)reject) {
95
                     reject:(RCTPromiseRejectBlock)reject) {
95
-#ifdef DEBUG
96
-    NSLog(@"[RNCallKit][setMuted] callUUID = %@", callUUID);
97
-#endif
96
+    DDLogInfo(@"[RNCallKit][setMuted] callUUID = %@", callUUID);
98
 
97
 
99
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
98
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
100
 
99
 
111
 }
110
 }
112
 
111
 
113
 RCT_EXPORT_METHOD(setProviderConfiguration:(NSDictionary *)dictionary) {
112
 RCT_EXPORT_METHOD(setProviderConfiguration:(NSDictionary *)dictionary) {
114
-#ifdef DEBUG
115
-    NSLog(
116
-        @"[RNCallKit][setProviderConfiguration:] dictionary = %@",
117
-        dictionary);
118
-#endif
113
+    DDLogInfo(@"[RNCallKit][setProviderConfiguration:] dictionary = %@", dictionary);
119
 
114
 
120
     if (![JMCallKitProxy isProviderConfigured]) {
115
     if (![JMCallKitProxy isProviderConfigured]) {
121
         [self configureProviderFromDictionary:dictionary];
116
         [self configureProviderFromDictionary:dictionary];
131
                       video:(BOOL)video
126
                       video:(BOOL)video
132
                     resolve:(RCTPromiseResolveBlock)resolve
127
                     resolve:(RCTPromiseResolveBlock)resolve
133
                      reject:(RCTPromiseRejectBlock)reject) {
128
                      reject:(RCTPromiseRejectBlock)reject) {
134
-#ifdef DEBUG
135
-    NSLog(@"[RNCallKit][startCall] callUUID = %@", callUUID);
136
-#endif
129
+    DDLogInfo(@"[RNCallKit][startCall] callUUID = %@", callUUID);
137
 
130
 
138
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
131
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
139
 
132
 
197
                      options:(NSDictionary *)options
190
                      options:(NSDictionary *)options
198
                      resolve:(RCTPromiseResolveBlock)resolve
191
                      resolve:(RCTPromiseResolveBlock)resolve
199
                       reject:(RCTPromiseRejectBlock)reject) {
192
                       reject:(RCTPromiseRejectBlock)reject) {
200
-#ifdef DEBUG
201
-    NSLog(
202
-        @"[RNCallKit][updateCall] callUUID = %@ options = %@",
203
-        callUUID,
204
-        options);
205
-#endif
193
+    DDLogInfo(@"[RNCallKit][updateCall] callUUID = %@ options = %@", callUUID, options);
206
 
194
 
207
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
195
     NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];
208
 
196
 
225
 #pragma mark - Helper methods
213
 #pragma mark - Helper methods
226
 
214
 
227
 - (void)configureProviderFromDictionary:(NSDictionary* )dictionary {
215
 - (void)configureProviderFromDictionary:(NSDictionary* )dictionary {
228
-#ifdef DEBUG
229
-    NSLog(@"[RNCallKit][providerConfigurationFromDictionary:]");
230
-#endif
216
+    DDLogInfo(@"[RNCallKit][providerConfigurationFromDictionary: %@]", dictionary);
231
 
217
 
232
     if (!dictionary) {
218
     if (!dictionary) {
233
         dictionary = @{};
219
         dictionary = @{};
271
 - (void)requestTransaction:(CXTransaction *)transaction
257
 - (void)requestTransaction:(CXTransaction *)transaction
272
                    resolve:(RCTPromiseResolveBlock)resolve
258
                    resolve:(RCTPromiseResolveBlock)resolve
273
                     reject:(RCTPromiseRejectBlock)reject {
259
                     reject:(RCTPromiseRejectBlock)reject {
274
-#ifdef DEBUG
275
-    NSLog(@"[RNCallKit][requestTransaction] transaction = %@", transaction);
276
-#endif
260
+    DDLogInfo(@"[RNCallKit][requestTransaction] transaction = %@", transaction);
277
 
261
 
278
     [JMCallKitProxy request:transaction
262
     [JMCallKitProxy request:transaction
279
                  completion:^(NSError * _Nullable error) {
263
                  completion:^(NSError * _Nullable error) {
280
         if (error) {
264
         if (error) {
281
-            NSLog(
282
-                @"[RNCallKit][requestTransaction] Error requesting transaction (%@): (%@)",
283
-                transaction.actions,
284
-                error);
265
+            DDLogError(@"[RNCallKit][requestTransaction] Error requesting transaction (%@): (%@)", transaction.actions, error);
285
             reject(nil, @"Error processing CallKit transaction", error);
266
             reject(nil, @"Error processing CallKit transaction", error);
286
         } else {
267
         } else {
287
             resolve(nil);
268
             resolve(nil);
293
 
274
 
294
 // Called when the provider has been reset. We should terminate all calls.
275
 // Called when the provider has been reset. We should terminate all calls.
295
 - (void)providerDidReset {
276
 - (void)providerDidReset {
296
-#ifdef DEBUG
297
-    NSLog(@"[RNCallKit][CXProviderDelegate][providerDidReset:]");
298
-#endif
277
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][providerDidReset:]");
299
 
278
 
300
     [self sendEventWithName:RNCallKitProviderDidReset body:nil];
279
     [self sendEventWithName:RNCallKitProviderDidReset body:nil];
301
 }
280
 }
302
 
281
 
303
 // Answering incoming call
282
 // Answering incoming call
304
 - (void) performAnswerCallWithUUID:(NSUUID *)UUID {
283
 - (void) performAnswerCallWithUUID:(NSUUID *)UUID {
305
-#ifdef DEBUG
306
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:performAnswerCallAction:]");
307
-#endif
284
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performAnswerCallAction:]");
308
 
285
 
309
     [self sendEventWithName:RNCallKitPerformAnswerCallAction
286
     [self sendEventWithName:RNCallKitPerformAnswerCallAction
310
                        body:@{ @"callUUID": UUID.UUIDString }];
287
                        body:@{ @"callUUID": UUID.UUIDString }];
312
 
289
 
313
 // Call ended, user request
290
 // Call ended, user request
314
 - (void) performEndCallWithUUID:(NSUUID *)UUID {
291
 - (void) performEndCallWithUUID:(NSUUID *)UUID {
315
-#ifdef DEBUG
316
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:performEndCallAction:]");
317
-#endif
292
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performEndCallAction:]");
318
 
293
 
319
     [self sendEventWithName:RNCallKitPerformEndCallAction
294
     [self sendEventWithName:RNCallKitPerformEndCallAction
320
                        body:@{ @"callUUID": UUID.UUIDString }];
295
                        body:@{ @"callUUID": UUID.UUIDString }];
323
 // Handle audio mute from CallKit view
298
 // Handle audio mute from CallKit view
324
 - (void) performSetMutedCallWithUUID:(NSUUID *)UUID
299
 - (void) performSetMutedCallWithUUID:(NSUUID *)UUID
325
                              isMuted:(BOOL)isMuted {
300
                              isMuted:(BOOL)isMuted {
326
-#ifdef DEBUG
327
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:performSetMutedCallAction:]");
328
-#endif
301
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performSetMutedCallAction:]");
329
 
302
 
330
     [self sendEventWithName:RNCallKitPerformSetMutedCallAction
303
     [self sendEventWithName:RNCallKitPerformSetMutedCallAction
331
                        body:@{
304
                        body:@{
337
 // Starting outgoing call
310
 // Starting outgoing call
338
 - (void) performStartCallWithUUID:(NSUUID *)UUID
311
 - (void) performStartCallWithUUID:(NSUUID *)UUID
339
                           isVideo:(BOOL)isVideo {
312
                           isVideo:(BOOL)isVideo {
340
-#ifdef DEBUG
341
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:performStartCallAction:]");
342
-#endif
313
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performStartCallAction:]");
314
+
343
     [JMCallKitProxy reportOutgoingCallWith:UUID
315
     [JMCallKitProxy reportOutgoingCallWith:UUID
344
                        startedConnectingAt:nil];
316
                        startedConnectingAt:nil];
345
 }
317
 }
346
 
318
 
347
 - (void) providerDidActivateAudioSessionWithSession:(AVAudioSession *)session {
319
 - (void) providerDidActivateAudioSessionWithSession:(AVAudioSession *)session {
348
-#ifdef DEBUG
349
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:didActivateAudioSession:]");
350
-#endif
320
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:didActivateAudioSession:]");
321
+
351
     [[RTCAudioSession sharedInstance] audioSessionDidActivate:session];
322
     [[RTCAudioSession sharedInstance] audioSessionDidActivate:session];
352
 }
323
 }
353
 
324
 
354
 - (void) providerDidDeactivateAudioSessionWithSession:(AVAudioSession *)session {
325
 - (void) providerDidDeactivateAudioSessionWithSession:(AVAudioSession *)session {
355
-#ifdef DEBUG
356
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:didDeactivateAudioSession:]");
357
-#endif
326
+    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:didDeactivateAudioSession:]");
327
+
358
     [[RTCAudioSession sharedInstance] audioSessionDidDeactivate:session];
328
     [[RTCAudioSession sharedInstance] audioSessionDidDeactivate:session];
359
 }
329
 }
360
 
330
 
361
 - (void) providerTimedOutPerformingActionWithAction:(CXAction *)action {
331
 - (void) providerTimedOutPerformingActionWithAction:(CXAction *)action {
362
-#ifdef DEBUG
363
-    NSLog(@"[RNCallKit][CXProviderDelegate][provider:timedOutPerformingAction:]");
364
-#endif
332
+    DDLogWarn(@"[RNCallKit][CXProviderDelegate][provider:timedOutPerformingAction:]");
365
 }
333
 }
366
 
334
 
367
 
335
 

+ 111
- 11
package-lock.json Näytä tiedosto

8100
     "function-bind": {
8100
     "function-bind": {
8101
       "version": "1.1.1",
8101
       "version": "1.1.1",
8102
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
8102
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
8103
-      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
8104
-      "dev": true
8103
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
8105
     },
8104
     },
8106
     "functional-red-black-tree": {
8105
     "functional-red-black-tree": {
8107
       "version": "1.0.1",
8106
       "version": "1.0.1",
8306
       "version": "1.0.1",
8305
       "version": "1.0.1",
8307
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
8306
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
8308
       "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
8307
       "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
8309
-      "dev": true,
8310
       "requires": {
8308
       "requires": {
8311
         "function-bind": "^1.0.2"
8309
         "function-bind": "^1.0.2"
8312
       }
8310
       }
8325
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
8323
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
8326
       "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
8324
       "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
8327
     },
8325
     },
8326
+    "has-symbols": {
8327
+      "version": "1.0.0",
8328
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
8329
+      "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
8330
+    },
8328
     "has-unicode": {
8331
     "has-unicode": {
8329
       "version": "2.0.1",
8332
       "version": "2.0.1",
8330
       "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
8333
       "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
9305
         "kind-of": "^3.0.2"
9308
         "kind-of": "^3.0.2"
9306
       }
9309
       }
9307
     },
9310
     },
9311
+    "is-arguments": {
9312
+      "version": "1.0.4",
9313
+      "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz",
9314
+      "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA=="
9315
+    },
9308
     "is-arrayish": {
9316
     "is-arrayish": {
9309
       "version": "0.2.1",
9317
       "version": "0.2.1",
9310
       "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
9318
       "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
9357
     "is-date-object": {
9365
     "is-date-object": {
9358
       "version": "1.0.1",
9366
       "version": "1.0.1",
9359
       "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
9367
       "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
9360
-      "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
9361
-      "dev": true
9368
+      "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
9362
     },
9369
     },
9363
     "is-descriptor": {
9370
     "is-descriptor": {
9364
       "version": "0.1.6",
9371
       "version": "0.1.6",
9401
       "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
9408
       "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
9402
       "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
9409
       "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
9403
     },
9410
     },
9411
+    "is-generator-function": {
9412
+      "version": "1.0.7",
9413
+      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz",
9414
+      "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw=="
9415
+    },
9404
     "is-number": {
9416
     "is-number": {
9405
       "version": "3.0.0",
9417
       "version": "3.0.0",
9406
       "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
9418
       "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
9456
       "version": "1.0.4",
9468
       "version": "1.0.4",
9457
       "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
9469
       "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
9458
       "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
9470
       "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
9459
-      "dev": true,
9460
       "requires": {
9471
       "requires": {
9461
         "has": "^1.0.1"
9472
         "has": "^1.0.1"
9462
       }
9473
       }
12032
           "requires": {
12043
           "requires": {
12033
             "safe-buffer": "~5.1.0"
12044
             "safe-buffer": "~5.1.0"
12034
           }
12045
           }
12046
+        },
12047
+        "util": {
12048
+          "version": "0.10.4",
12049
+          "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
12050
+          "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
12051
+          "dev": true,
12052
+          "requires": {
12053
+            "inherits": "2.0.3"
12054
+          }
12035
         }
12055
         }
12036
       }
12056
       }
12037
     },
12057
     },
12285
         "isobject": "^3.0.0"
12305
         "isobject": "^3.0.0"
12286
       }
12306
       }
12287
     },
12307
     },
12308
+    "object.entries": {
12309
+      "version": "1.1.0",
12310
+      "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz",
12311
+      "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==",
12312
+      "requires": {
12313
+        "define-properties": "^1.1.3",
12314
+        "es-abstract": "^1.12.0",
12315
+        "function-bind": "^1.1.1",
12316
+        "has": "^1.0.3"
12317
+      },
12318
+      "dependencies": {
12319
+        "define-properties": {
12320
+          "version": "1.1.3",
12321
+          "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
12322
+          "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
12323
+          "requires": {
12324
+            "object-keys": "^1.0.12"
12325
+          }
12326
+        },
12327
+        "es-abstract": {
12328
+          "version": "1.13.0",
12329
+          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
12330
+          "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
12331
+          "requires": {
12332
+            "es-to-primitive": "^1.2.0",
12333
+            "function-bind": "^1.1.1",
12334
+            "has": "^1.0.3",
12335
+            "is-callable": "^1.1.4",
12336
+            "is-regex": "^1.0.4",
12337
+            "object-keys": "^1.0.12"
12338
+          }
12339
+        },
12340
+        "es-to-primitive": {
12341
+          "version": "1.2.0",
12342
+          "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
12343
+          "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
12344
+          "requires": {
12345
+            "is-callable": "^1.1.4",
12346
+            "is-date-object": "^1.0.1",
12347
+            "is-symbol": "^1.0.2"
12348
+          }
12349
+        },
12350
+        "has": {
12351
+          "version": "1.0.3",
12352
+          "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
12353
+          "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
12354
+          "requires": {
12355
+            "function-bind": "^1.1.1"
12356
+          }
12357
+        },
12358
+        "is-callable": {
12359
+          "version": "1.1.4",
12360
+          "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
12361
+          "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA=="
12362
+        },
12363
+        "is-symbol": {
12364
+          "version": "1.0.2",
12365
+          "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
12366
+          "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
12367
+          "requires": {
12368
+            "has-symbols": "^1.0.0"
12369
+          }
12370
+        },
12371
+        "object-keys": {
12372
+          "version": "1.1.1",
12373
+          "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
12374
+          "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
12375
+        }
12376
+      }
12377
+    },
12288
     "object.getownpropertydescriptors": {
12378
     "object.getownpropertydescriptors": {
12289
       "version": "2.0.3",
12379
       "version": "2.0.3",
12290
       "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
12380
       "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
17339
       "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
17429
       "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
17340
     },
17430
     },
17341
     "util": {
17431
     "util": {
17342
-      "version": "0.10.4",
17343
-      "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
17344
-      "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
17345
-      "dev": true,
17432
+      "version": "0.12.1",
17433
+      "resolved": "https://registry.npmjs.org/util/-/util-0.12.1.tgz",
17434
+      "integrity": "sha512-MREAtYOp+GTt9/+kwf00IYoHZyjM8VU4aVrkzUlejyqaIjd2GztVl5V9hGXKlvBKE3gENn/FMfHE5v6hElXGcQ==",
17346
       "requires": {
17435
       "requires": {
17347
-        "inherits": "2.0.3"
17436
+        "inherits": "^2.0.3",
17437
+        "is-arguments": "^1.0.4",
17438
+        "is-generator-function": "^1.0.7",
17439
+        "object.entries": "^1.1.0",
17440
+        "safe-buffer": "^5.1.2"
17441
+      },
17442
+      "dependencies": {
17443
+        "safe-buffer": {
17444
+          "version": "5.2.0",
17445
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
17446
+          "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg=="
17447
+        }
17348
       }
17448
       }
17349
     },
17449
     },
17350
     "util-deprecate": {
17450
     "util-deprecate": {

+ 1
- 0
package.json Näytä tiedosto

86
     "redux": "4.0.4",
86
     "redux": "4.0.4",
87
     "redux-thunk": "2.2.0",
87
     "redux-thunk": "2.2.0",
88
     "styled-components": "3.4.9",
88
     "styled-components": "3.4.9",
89
+    "util": "0.12.1",
89
     "uuid": "3.1.0",
90
     "uuid": "3.1.0",
90
     "windows-iana": "^3.1.0",
91
     "windows-iana": "^3.1.0",
91
     "xmldom": "0.1.27"
92
     "xmldom": "0.1.27"

+ 65
- 0
react/features/base/logging/LogTransport.native.js Näytä tiedosto

1
+// @flow
2
+
3
+import { NativeModules } from 'react-native';
4
+import { format } from 'util';
5
+
6
+// Some code adapted from https://github.com/houserater/react-native-lumberjack
7
+// License: MIT
8
+
9
+const { LogBridge } = NativeModules;
10
+
11
+/**
12
+ * Returns the stack trace for a given @code {Error} object.
13
+ *
14
+ * @param {Errror} e - The rrror.
15
+ * @returns {string} - The stack trace.
16
+ */
17
+function stackToString(e) {
18
+    let ce;
19
+    let s = e.stack;
20
+
21
+    if (typeof e.cause === 'function' && (ce = e.cause())) {
22
+        s += `\nCaused by: ${stackToString(ce)}`;
23
+    }
24
+
25
+    return s;
26
+}
27
+
28
+/**
29
+ * Constructs a log transport object for use with jitsi-meet-logger.
30
+ *
31
+ * @returns {Object} - The transport object.
32
+ */
33
+function buildTransport() {
34
+    return [
35
+        'trace',
36
+        'debug',
37
+        'info',
38
+        'log',
39
+        'warn',
40
+        'error'
41
+    ].reduce((logger, logName) => {
42
+        logger[logName] = (...args: Array<string>) => {
43
+            const nargs = args.map(arg => {
44
+                if (arg instanceof Error) {
45
+                    const errorBody = {
46
+                        message: arg.message,
47
+                        code: arg.code,
48
+                        stack: stackToString(arg)
49
+                    };
50
+
51
+                    return `Error(${arg.name})${JSON.stringify(errorBody)}`;
52
+                }
53
+
54
+                return arg;
55
+            });
56
+            const message = format(...nargs);
57
+
58
+            LogBridge[logName](message);
59
+        };
60
+
61
+        return logger;
62
+    }, {});
63
+}
64
+
65
+export default buildTransport();

+ 0
- 0
react/features/base/logging/LogTransport.web.js Näytä tiedosto


+ 23
- 1
react/features/base/logging/functions.js Näytä tiedosto

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { getLogger as _getLogger } from 'jitsi-meet-logger';
3
+import _ from 'lodash';
4
+import Logger, { getLogger as _getLogger } from 'jitsi-meet-logger';
5
+
6
+import LogTransport from './LogTransport';
4
 
7
 
5
 /**
8
 /**
6
  * Options for building the logger. We disable the callee info on RN because it's
9
  * Options for building the logger. We disable the callee info on RN because it's
20
 
23
 
21
     return _getLogger(id, undefined, opts);
24
     return _getLogger(id, undefined, opts);
22
 }
25
 }
26
+
27
+/**
28
+ * Initializes native logging. This operations must be done as early as possible.
29
+ */
30
+export const _initLogging = _.once(() => {
31
+    if (navigator.product !== 'ReactNative') {
32
+        return;
33
+    }
34
+
35
+    // Lazy load it to avoid cycles in early web bootstrap code.
36
+    const { default: JitsiMeetJS } = require('../lib-jitsi-meet');
37
+
38
+    Logger.setGlobalOptions(DEFAULT_RN_OPTS);
39
+    JitsiMeetJS.setGlobalLogOptions(DEFAULT_RN_OPTS);
40
+    Logger.removeGlobalTransport(console);
41
+    JitsiMeetJS.removeGlobalLogTransport(console);
42
+    Logger.addGlobalTransport(LogTransport);
43
+    JitsiMeetJS.addGlobalLogTransport(LogTransport);
44
+});

+ 0
- 6
react/features/base/logging/middleware.js Näytä tiedosto

163
         logCollector.stop();
163
         logCollector.stop();
164
         dispatch(setLogCollector(undefined));
164
         dispatch(setLogCollector(undefined));
165
     }
165
     }
166
-
167
-    // Disable caller function info.
168
-    if (navigator.product === 'ReactNative') {
169
-        Logger.setGlobalOptions({ disableCallerInfo: true });
170
-        JitsiMeetJS.setGlobalLogOptions({ disableCallerInfo: true });
171
-    }
172
 }
166
 }
173
 
167
 
174
 /**
168
 /**

+ 6
- 0
react/index.native.js Näytä tiedosto

16
 import { App } from './features/app';
16
 import { App } from './features/app';
17
 import { IncomingCallApp } from './features/mobile/incoming-call';
17
 import { IncomingCallApp } from './features/mobile/incoming-call';
18
 
18
 
19
+// It's crucial that the native loggers are created ASAP, not to lose any data.
20
+import { _initLogging } from './features/base/logging/functions';
21
+
19
 declare var __DEV__;
22
 declare var __DEV__;
20
 
23
 
21
 /**
24
 /**
51
     }
54
     }
52
 }
55
 }
53
 
56
 
57
+// Initialize logging.
58
+_initLogging();
59
+
54
 // HORRIBLE HACK ALERT! React Native logs the initial props with `console.log`. Here we are quickly patching it
60
 // HORRIBLE HACK ALERT! React Native logs the initial props with `console.log`. Here we are quickly patching it
55
 // to avoid logging potentially sensitive information.
61
 // to avoid logging potentially sensitive information.
56
 if (!__DEV__) {
62
 if (!__DEV__) {

Loading…
Peruuta
Tallenna