Krzysztof Krysztofczyk
Krzysztof Krysztofczyk

Reputation: 499

NLog ConfigSettingLayoutRenderer - the best place to set configuration

I would like to store some parts of the Nlog configurations (like DB connection string) at appsettings.json (production data are coming from the azure key vault) To do that I have to put something like that:

NLog.Extensions.Logging.ConfigSettingLayoutRenderer.DefaultConfiguration = configuration;

Assuming that I'm using the Blazor Server side app, where is the best place to put that line?

Upvotes: 0

Views: 179

Answers (1)

Julian
Julian

Reputation: 36790

The entry point sounds like a good idea, so Program.cs for Blazor Server apps.

Program.cs is the entry point for the app that starts the server and where you configure the app services and middleware

From Blazor Server Tutorial

Upvotes: 1

Related Questions