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
@@ -153,6 +153,7 @@ var value = await client.GetBooleanValueAsync("boolFlag", false, context, new Fl
153
153
### Logging
154
154
155
155
The .NET SDK uses Microsoft.Extensions.Logging. See the [manual](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line) for complete documentation.
156
+
Note that in accordance with the OpenFeature specification, the SDK doesn't generally log messages during flag evaluation. If you need further troubleshooting, please look into the `Logging Hook` section.
156
157
157
158
#### Logging Hook
158
159
@@ -165,6 +166,7 @@ var logger = loggerFactory.CreateLogger("Program");
165
166
varclient=Api.Instance.GetClient();
166
167
client.AddHooks(newLoggingHook(logger));
167
168
```
169
+
168
170
See [hooks](#hooks) for more information on configuring hooks.
169
171
170
172
### Domains
@@ -260,6 +262,7 @@ To register a [AsyncLocal](https://learn.microsoft.com/en-us/dotnet/api/system.t
260
262
// registering the AsyncLocalTransactionContextPropagator
Additionally, you can develop a custom transaction context propagator by implementing the `TransactionContextPropagator` interface and registering it as shown above.
273
277
274
278
## Extending
@@ -352,19 +356,25 @@ public class MyHook : Hook
352
356
Built a new hook? [Let us know](https://github.com/open-feature/openfeature.dev/issues/new?assignees=&labels=hook&projects=&template=document-hook.yaml&title=%5BHook%5D%3A+) so we can add it to the docs!
353
357
354
358
### DependencyInjection
359
+
355
360
> [!NOTE]
356
361
> The OpenFeature.DependencyInjection and OpenFeature.Hosting packages are currently experimental. They streamline the integration of OpenFeature within .NET applications, allowing for seamless configuration and lifecycle management of feature flag providers using dependency injection and hosting services.
357
362
358
363
#### Installation
364
+
359
365
To set up dependency injection and hosting capabilities for OpenFeature, install the following packages:
<br />To set up multiple providers with a selection policy, define logic for choosing the default provider. This example designates `name1` as the default provider:
You can register a custom provider, such as `InMemoryProvider`, with OpenFeature using the `AddProvider` method. This approach allows you to dynamically resolve services or configurations during registration.
0 commit comments