You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`.all` (The default, this will log all subsystems available).
44
+
-`.database` (The subsystem responsible for database operations).
45
+
-`.httpRequests` (The subsystem responsible for HTTP operations).
46
+
-`.webSocket` (The subsystem responsible for WebSocket operations).
47
+
-`.offlineSupport` (The subsystem responsible for offline support).
48
+
-`.authentication` (The subsystem responsible for authentication).
49
+
-`.audioPlayback` (The subsystem responsible for audio playback).
50
+
-`.audioRecording` (The subsystem responsible for audio recording).
51
+
-`.other` (This is the subsystem related to misc logs and not related to any subsystem).
52
+
28
53
## Customizing Logs
29
54
30
55
By default, the logs will provide basic text to your console. Still, in the SDK, we have functionality that enables you to provide custom Emoji's to identify logs coming from the SDK quickly.
@@ -45,4 +70,30 @@ LogConfig.showDate = false
45
70
LogConfig.showFunctionName=false
46
71
```
47
72
48
-
Here, you're hiding the `threadName`, `date` and `functionName`.
73
+
Here, you're hiding the `threadName`, `date` and `functionName` from the log.
74
+
75
+
## Intercepting Logs
76
+
77
+
You can also intercept logs from the SDK so that you can send the data to your own servers or any other third-party analytics provider.
78
+
79
+
The way you do this is by creating a custom log destination.
80
+
81
+
```swift
82
+
classCustomLogDestination: BaseLogDestination {
83
+
overridefuncprocess(logDetails: LogDetails) {
84
+
let level = logDetails.level
85
+
let message = logDetails.message
86
+
// Send the log details to your server or third-party SDK
87
+
...
88
+
}
89
+
}
90
+
```
91
+
92
+
Make sure that you set the log destination before initialising the Stream Chat SDK:
93
+
94
+
```swift
95
+
LogConfig.destinationTypes= [
96
+
ConsoleLogDestination.self,
97
+
CustomLogDestination.self// Your custom destination
0 commit comments