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
Copy file name to clipboardExpand all lines: src/pages/docs/chat/connect.mdx
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,3 +209,72 @@ subscription.unsubscribe()
209
209
<Iflang="javascript,swift,kotlin">
210
210
The discontinuity handler is accessible via the <Iflang="javascript">[Room](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/interfaces/chat-js.Room.html#onDiscontinuity)</If><Iflang="swift">[Room](https://sdk.ably.com/builds/ably/ably-chat-swift/main/AblyChat/documentation/ablychat/room)</If><Iflang="kotlin">[Room](https://sdk.ably.com/builds/ably/ably-chat-kotlin/main/dokka/chat-android/com.ably.chat/-room/index.html)</If> object.
211
211
</If>
212
+
213
+
## Logging <aid="logging"/>
214
+
215
+
Set the `logHandler` and `logLevel` properties when [instantiating a client](#instantiate) to configure your log handler:
The `logHandler` property is your own function that will be called for each line of log output generated by the Chat SDK.
265
+
</If>
266
+
267
+
<Iflang="swift,kotlin">
268
+
The `logHandler` property is your custom `LogHandler` implementation that will be called for each line of log output generated by the Chat SDK.
269
+
</If>
270
+
271
+
The `logLevel` sets the verbosity of logs that will be output by the SDK. The following log levels are available to set:
272
+
273
+
| Level | Description |
274
+
| ----- | ----------- |
275
+
| trace | Something routine and expected has occurred. This level will provide logs for the vast majority of operations and function calls. |
276
+
| debug | Development information, messages that are useful when trying to debug library behavior, but superfluous to normal operation. |
277
+
| info | Informational messages. Operationally significant to the library but not out of the ordinary. |
278
+
| warn | Anything that is not immediately an error, but could cause unexpected behavior in the future. For example, passing an invalid value to an option. Indicates that some action should be taken to prevent future errors. |
279
+
| error | A given operation has failed and cannot be automatically recovered. The error may threaten the continuity of operation. |
0 commit comments