Reputation: 499
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
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
Upvotes: 1