diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj
index 2d6759b0..c18c95c9 100644
--- a/MP.IOC/MP.IOC.csproj
+++ b/MP.IOC/MP.IOC.csproj
@@ -22,9 +22,10 @@
-
-
-
+
+
+
+
diff --git a/MP.IOC/Program.cs b/MP.IOC/Program.cs
index 6bfc3270..fc2ab5ae 100644
--- a/MP.IOC/Program.cs
+++ b/MP.IOC/Program.cs
@@ -1,9 +1,16 @@
using Microsoft.Extensions.Configuration;
using MP.IOC.Data;
+using NLog;
+using NLog.Web;
using StackExchange.Redis;
var builder = WebApplication.CreateBuilder(args);
+var logger = LogManager.Setup()
+ .LoadConfigurationFromAppSettings()
+ .GetCurrentClassLogger();
+logger.Info("Program.cs: startup");
+
// Add services to the container.
builder.Services.AddControllers();
@@ -13,6 +20,7 @@ builder.Services.AddSwaggerGen();
ConfigurationManager configuration = builder.Configuration;
// REDIS setup
+logger.Info("Setup REDIS");
string connStringRedis = configuration.GetConnectionString("Redis");
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
// avvio oggetto shared x redis...
@@ -28,6 +36,7 @@ if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
app.UseSwagger();
app.UseSwaggerUI();
}
+logger.Info("Added swagger");
app.UseHttpsRedirection();
@@ -39,4 +48,6 @@ app.UseStaticFiles();
app.MapControllers();
+logger.Info("Run App");
+
app.Run();
diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html
index 46297c1a..2aa300c6 100644
--- a/MP.IOC/Resources/ChangeLog.html
+++ b/MP.IOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-IOC
- Versione: 6.16.2310.411
+ Versione: 6.16.2409.409
Note di rilascio:
-
diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt
index e1d45667..aa8ead2c 100644
--- a/MP.IOC/Resources/VersNum.txt
+++ b/MP.IOC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2310.411
+6.16.2409.409
diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml
index b9a0b9da..28cce849 100644
--- a/MP.IOC/Resources/manifest.xml
+++ b/MP.IOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2310.411
+ 6.16.2409.409
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.IOC/appsettings.json b/MP.IOC/appsettings.json
index cc3c93b2..f272f2db 100644
--- a/MP.IOC/appsettings.json
+++ b/MP.IOC/appsettings.json
@@ -5,6 +5,49 @@
"Microsoft.AspNetCore": "Warning"
}
},
+ "NLog": {
+ "variables": {
+ "baseFileDir": "${basedir}/logs/",
+ "layout": "${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
+ },
+ // "internalLogLevel": "Info",
+ // "internalLogFile": "c:\\temp\\internal-nlog.txt",
+ "extensions": [
+ { "assembly": "NLog.Extensions.Logging" },
+ { "assembly": "NLog.Web.AspNetCore" }
+ ],
+ "throwConfigExceptions": true,
+ "targets": {
+ "async": true,
+ "logfile": {
+ "type": "File",
+ "fileName": "${basedir}/logs/${shortdate}.log",
+ "archiveEvery": "Day",
+ "archiveFileName": "${basedir}/logs/old/${shortdate}_{#}.log",
+ "archiveNumbering": "DateAndSequence",
+ "archiveAboveSize": "1024000",
+ "archiveDateFormat": "HH",
+ "maxArchiveFiles": "60",
+ "maxArchiveDays": "30"
+ },
+ "logconsole": {
+ "type": "ColoredConsole",
+ "layout": "${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}"
+ }
+ },
+ "rules": [
+ {
+ "logger": "*",
+ "minLevel": "Trace",
+ "writeTo": "logconsole"
+ },
+ {
+ "logger": "*",
+ "minLevel": "Info",
+ "writeTo": "logfile"
+ }
+ ]
+ },
"AllowedHosts": "*",
"CodApp": "MP.IOC",
"ConnectionStrings": {