Skip to content

Commit 4df62c1

Browse files
committed
[ECO-5624] Added README section for unity usage
1 parent 2838467 commit 4df62c1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,30 @@ channel.Subscribe(message =>
100100
await channel.PublishAsync("test-event", "Hello World!");
101101
```
102102

103+
Enable logging using a new class that implements `ILoggerSink` interface.
104+
105+
```csharp
106+
class CustomLogHandler : ILoggerSink
107+
{
108+
public void LogEvent(LogLevel level, string message)
109+
{
110+
Console.WriteLine($"Handler LogLevel : {level}, Data :{message}");
111+
}
112+
}
113+
```
114+
115+
Update clientOptions for `LogLevel` and `LogHandler`.
116+
117+
```csharp
118+
clientOpts.LogLevel = LogLevel.Debug;
119+
clientOpts.LogHandler = new CustomLogHandler();
120+
```
121+
122+
### Unity usage
123+
124+
- Download latest `ably.io.*.unitypackage` from [releases section](https://github.com/ably/ably-dotnet/releases) and include it in the unity project.
125+
- For more information, check [Unity README](./unity/README.md)
126+
103127
## Releases
104128

105129
The [CHANGELOG.md](./CHANGELOG.md) contains details of the latest releases for this SDK. You can also view all Ably releases on [changelog.ably.com](https://changelog.ably.com).

0 commit comments

Comments
 (0)