diff --git a/docs/preview/03-Guidance/use-with-dotnet-and-functions.md b/docs/preview/03-Guidance/use-with-dotnet-and-functions.md index 2adc287e..c3341596 100644 --- a/docs/preview/03-Guidance/use-with-dotnet-and-functions.md +++ b/docs/preview/03-Guidance/use-with-dotnet-and-functions.md @@ -14,8 +14,6 @@ Some aspects we would like to highlight are: - Make sure to call [`UseSerilog`](https://www.nuget.org/packages/Serilog.AspNetCore) when creating a `IHostBuilder` - Remove default for logging including its configuration in `appsettings.json` *(if applicable)* -If you cannot use `UseSerilog`, you can still configure it by using `AddSerilog` as a logging provider; but we recommend removing all other providers with `loggingBuilder.ClearProviders()` so that they don't interfere. - ## Setting up Serilog with Azure Functions Using Serilog with Azure Functions requires some guidance and we've made it a bit easier to use. diff --git a/docs/versioned_docs/version-v2.4/03-Guidance/use-with-dotnet-and-functions.md b/docs/versioned_docs/version-v2.4/03-Guidance/use-with-dotnet-and-functions.md index 3c4b5cce..c3341596 100644 --- a/docs/versioned_docs/version-v2.4/03-Guidance/use-with-dotnet-and-functions.md +++ b/docs/versioned_docs/version-v2.4/03-Guidance/use-with-dotnet-and-functions.md @@ -14,8 +14,6 @@ Some aspects we would like to highlight are: - Make sure to call [`UseSerilog`](https://www.nuget.org/packages/Serilog.AspNetCore) when creating a `IHostBuilder` - Remove default for logging including its configuration in `appsettings.json` *(if applicable)* -If you cannot use `UseSerilog`, you can still configure it by using `AddSerilog` as a logging provider; but we recommend removing all other providers with `loggingBuilder.ClearProviders()` so that they don't interfere. - ## Setting up Serilog with Azure Functions Using Serilog with Azure Functions requires some guidance and we've made it a bit easier to use. @@ -54,7 +52,6 @@ namespace Arcus.Samples.AzureFunction builder.Services.AddLogging(loggingBuilder => { - loggingBuilder.ClearProvidersExceptFunctionProviders(); loggingBuilder.AddSerilog(logger); }); } @@ -62,8 +59,6 @@ namespace Arcus.Samples.AzureFunction } ``` -> :bulb: Note that we are using `ClearProvidersExceptFunctionProviders` instead of `ClearProviders` given Azure Functions requires some logging providers to be available. - Here is an example of how you can use ILogger to write multi-dimensional metrics with Arcus. If Serilog would not be setup correctly (see above), it would only report the metric without the dimensions. ```csharp