Aggiunto NLog
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using NLog.Web;
|
||||
using StackExchange.Redis;
|
||||
using System.Reflection;
|
||||
using Test.UI.Client.Pages;
|
||||
@@ -10,7 +11,12 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version?.ToString();
|
||||
|
||||
var logger = LogManager.Setup()
|
||||
.LoadConfigurationFromAppSettings()
|
||||
.GetCurrentClassLogger();
|
||||
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
logger.Info("Program.cs: startup");
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorComponents()
|
||||
@@ -36,6 +42,7 @@ var app = builder.Build();
|
||||
// aggiunt base URL x routing corretto
|
||||
string baseUrl = configuration.GetValue<string>("ServerConf:BaseUrl") ?? "";
|
||||
app.UsePathBase(baseUrl);
|
||||
logger.Info($"BaseUrl: {baseUrl}");
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
|
||||
Reference in New Issue
Block a user