Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Add logger
Browse files Browse the repository at this point in the history
  • Loading branch information
incubo4u committed Nov 20, 2023
1 parent 8f96efc commit ca5085c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ios/MembraneWebRTC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import AVKit
import WebRTC
import ExpoModulesCore

let log = OSLog(subsystem: "com.example.app", category: "MyLogger")
let log = OSLog(subsystem: "com.swm.membranewebrtc", category: "ErrorHandling")

#if os(iOS)
@available(iOS 12, *)
public extension RPSystemBroadcastPickerView {
Expand Down Expand Up @@ -231,7 +232,7 @@ class MembraneWebRTC: MembraneRTCDelegate {
membraneRTC?.receiveMediaEvent(mediaEvent: data as SerializedMediaEvent)
}


func connect(metadata: [String: Any], promise: Promise) {
connectPromise = promise
localUserMetadata = metadata.toMetadata()
Expand Down Expand Up @@ -418,7 +419,7 @@ class MembraneWebRTC: MembraneRTCDelegate {
try setScreencastTrackState(isEnabled: true)
}
catch{
print("Error starting screencast: \(error)")
os_log("Error starting screencast: \(error)", log: log, type: .error)
}

}, onStop: { [weak self] in
Expand All @@ -432,7 +433,7 @@ class MembraneWebRTC: MembraneRTCDelegate {
try setScreencastTrackState(isEnabled: false)
}
catch{
print("Error stoping screencast: \(error)")
os_log("Error starting screencast: \(error)", log: log, type: .error)
}
})
DispatchQueue.main.async {
Expand Down

0 comments on commit ca5085c

Please sign in to comment.